Skip to content

Commit bd7a172

Browse files
committed
Added package and using single class imports.
1 parent 2d24de7 commit bd7a172

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

examples/java/src/test/java/dev/selenium/interactions/AlertsTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
package dev.selenium.interactions;
19+
1820
import dev.selenium.BaseTest;
1921
import org.junit.jupiter.api.Test;
20-
import org.openqa.selenium.*;
22+
import org.openqa.selenium.Alert;
23+
import org.openqa.selenium.JavascriptExecutor;
24+
import org.openqa.selenium.WebDriver;
2125
import org.openqa.selenium.chrome.ChromeDriver;
2226
import org.openqa.selenium.chrome.ChromeOptions;
2327
import org.openqa.selenium.support.ui.ExpectedConditions;

examples/java/src/test/java/dev/selenium/interactions/CookiesTest.java

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18+
package dev.selenium.interactions;
19+
1820
import org.junit.jupiter.api.Test;
1921
import org.junit.jupiter.api.Assertions;
2022
import org.openqa.selenium.Cookie;
@@ -34,21 +36,21 @@ public void addCookie() {
3436
}
3537
@Test
3638
public void getNamedCookie() {
37-
39+
3840
driver.get("https://www.selenium.dev/selenium/web/blank.html");
3941
// Add cookie into current browser context
4042
driver.manage().addCookie(new Cookie("foo", "bar"));
4143
// Get cookie details with named cookie 'foo'
4244
Cookie cookie = driver.manage().getCookieNamed("foo");
4345
Assertions.assertEquals(cookie.getValue(), "bar");
44-
46+
4547
driver.quit();
4648
}
47-
49+
4850

4951
@Test
5052
public void getAllCookies() {
51-
53+
5254
driver.get("https://www.selenium.dev/selenium/web/blank.html");
5355
// Add cookies into current browser context
5456
driver.manage().addCookie(new Cookie("test1", "cookie1"));
@@ -66,11 +68,11 @@ public void getAllCookies() {
6668
}
6769
driver.quit();
6870
}
69-
71+
7072

7173
@Test
7274
public void deleteCookieNamed() {
73-
75+
7476
driver.get("https://www.selenium.dev/selenium/web/blank.html");
7577
driver.manage().addCookie(new Cookie("test1", "cookie1"));
7678
// delete cookie named
@@ -80,7 +82,7 @@ public void deleteCookieNamed() {
8082

8183
@Test
8284
public void deleteCookieObject() {
83-
85+
8486
driver.get("https://www.selenium.dev/selenium/web/blank.html");
8587
Cookie cookie = new Cookie("test2", "cookie2");
8688
driver.manage().addCookie(cookie);
@@ -89,21 +91,21 @@ public void deleteCookieObject() {
8991
cookie by passing cookie object of current browsing context
9092
*/
9193
driver.manage().deleteCookie(cookie);
92-
94+
9395
driver.quit();
9496
}
95-
97+
9698

9799
@Test
98100
public void deleteAllCookies() {
99-
101+
100102
driver.get("https://www.selenium.dev/selenium/web/blank.html");
101103
// Add cookies into current browser context
102104
driver.manage().addCookie(new Cookie("test1", "cookie1"));
103105
driver.manage().addCookie(new Cookie("test2", "cookie2"));
104106
// Delete All cookies
105107
driver.manage().deleteAllCookies();
106-
108+
107109
driver.quit();
108110
}
109111

0 commit comments

Comments
 (0)