Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>4.6.0</version>
<version>4.11.0</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
Expand All @@ -154,7 +154,7 @@
<artifactId>selenium-support</artifactId>
</exclusion>
</exclusions>
<version>8.1.0</version>
<version>8.5.0</version>
</dependency>
<dependency>
<groupId>net.lightbody.bmp</groupId>
Expand All @@ -164,13 +164,17 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>31.1-jre</version>
<version>32.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>selenide</artifactId>

<version>6.12.2</version>
<version>6.17.2</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.5.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/testUI/BrowserLogs.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ public void setLogs() {
}
if (Configuration.browserLogs || Configuration.logNetworkCalls) {
Configuration.selenideBrowserCapabilities.setCapability("goog:loggingPrefs", logPrefs);
Configuration.selenideBrowserCapabilities.setCapability(
CapabilityType.LOGGING_PREFS, logPrefs);
}
}

Expand Down
12 changes: 7 additions & 5 deletions src/test/java/TestRunners/TestAndroidLocal.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import static testUI.Configuration.ANDROID_PLATFORM;
import static testUI.TestUIServer.stop;
import static testUI.UIOpen.open;
import static testUI.UIUtils.executeJs;
import static testUI.Utils.AppiumHelps.sleep;
import static testUI.Utils.By.byMobileCss;
import static testUI.elements.TestUI.E;

Expand All @@ -23,14 +25,14 @@ public void testAndroidBrowser() {
Configuration.automationType = ANDROID_PLATFORM;
Configuration.installMobileChromeDriver = true;
open("https://www.google.com");
googleLandingPage.getGoogleSearchInput().scrollTo().view(true)
.given("Check search input visible and set value").waitFor(5)
.untilIsVisible();
executeJs("arguments[0].value='TestUI';", googleLandingPage.getGoogleSearchInput()
.getMobileElement());
sleep(2000);
stop();
Configuration.testUILogLevel = LogLevel.DEBUG;
open("https://www.google.com");
googleLandingPage.getGoogleSearchInput().scrollTo().view(true)
.given("Check search input visible and set value");
executeJs("arguments[0].value='TestUI';", googleLandingPage.getGoogleSearchInput()
.getMobileElement());
}

@Test
Expand Down
9 changes: 4 additions & 5 deletions src/test/java/TestRunners/TestBrowser.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import org.junit.Test;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.remote.DesiredCapabilities;
import pages.GoogleLandingPage;
import testUI.Configuration;

Expand Down Expand Up @@ -53,8 +52,8 @@ public void setDriverTest() {
"--user-agent=Agent", "--ignore-certificate-errors", "--headless", "--remote-allow-origins=*");
Configuration.chromeOptions = options;
selenideBrowserCapabilities.setBrowserName("chrome");
open("https://www.whatsmyua.info/");
E(byCssSelector("textarea")).waitFor(10).untilHasText("Agent");
open("https://www.whatismybrowser.com/detect/what-is-my-user-agent/");
E(byCssSelector("#detected_value a")).waitFor(10).untilHasText("Agent");
sleep(1000);
stop();
}
Expand Down Expand Up @@ -98,8 +97,8 @@ public void testDesktopCustomDriverBrowser() {
options.addArguments("--headless");
ChromeDriver chromeDriver = new ChromeDriver(options);
setDriver(chromeDriver);
open("https://www.whatsmyua.info/");
E(byCssSelector("textarea")).waitFor(10).untilHasText(userAgent);
open("https://www.whatismybrowser.com/detect/what-is-my-user-agent/");
E(byCssSelector("#detected_value a")).waitFor(10).untilHasText(userAgent);
stop();
open("https://www.google.com");
stop();
Expand Down