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
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package io.appium.java_client.android;

import io.appium.java_client.TestUtils;
import io.appium.java_client.utils.TestUtils;

import java.nio.file.Path;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package io.appium.java_client.service.local;

import io.appium.java_client.TestUtils;
import io.appium.java_client.android.TestResources;
import io.appium.java_client.android.options.UiAutomator2Options;
import io.appium.java_client.utils.TestUtils;
import io.github.bonigarcia.wdm.WebDriverManager;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
Expand All @@ -17,14 +17,14 @@
import java.util.List;
import java.util.Map;

import static io.appium.java_client.TestUtils.getLocalIp4Address;
import static io.appium.java_client.service.local.AppiumDriverLocalService.buildDefaultService;
import static io.appium.java_client.service.local.AppiumServiceBuilder.APPIUM_PATH;
import static io.appium.java_client.service.local.AppiumServiceBuilder.BROADCAST_IP4_ADDRESS;
import static io.appium.java_client.service.local.AppiumServiceBuilder.DEFAULT_APPIUM_PORT;
import static io.appium.java_client.service.local.flags.GeneralServerFlag.BASEPATH;
import static io.appium.java_client.service.local.flags.GeneralServerFlag.CALLBACK_ADDRESS;
import static io.appium.java_client.service.local.flags.GeneralServerFlag.SESSION_OVERRIDE;
import static io.appium.java_client.utils.TestUtils.getLocalIp4Address;
import static io.github.bonigarcia.wdm.WebDriverManager.chromedriver;
import static java.lang.System.getProperty;
import static java.lang.System.setProperty;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package io.appium.java_client.android;

import io.appium.java_client.AppiumBy;
import io.appium.java_client.TestUtils;
import io.appium.java_client.flutter.commands.DoubleClickParameter;
import io.appium.java_client.flutter.commands.DragAndDropParameter;
import io.appium.java_client.flutter.commands.LongPressParameter;
import io.appium.java_client.flutter.commands.ScrollParameter;
import io.appium.java_client.flutter.commands.WaitParameter;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.Point;
import org.openqa.selenium.WebElement;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.appium.java_client.ios;

import io.appium.java_client.TestUtils;
import io.appium.java_client.ios.options.XCUITestOptions;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.BeforeAll;
import org.openqa.selenium.SessionNotCreatedException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,31 @@

package io.appium.java_client.ios;

import io.appium.java_client.TestUtils;
import io.appium.java_client.ios.options.XCUITestOptions;
import org.junit.jupiter.api.BeforeAll;
import org.openqa.selenium.SessionNotCreatedException;

import java.io.IOException;
import java.net.URL;
import java.time.Duration;
import java.util.function.Supplier;

public class BaseIOSWebViewTest extends BaseIOSTest {
private static final String VODQA_ZIP = TestUtils.resourcePathToAbsolutePath("vodqa.zip").toString();
import static io.appium.java_client.utils.TestUtils.IOS_SIM_VODQA_RELEASE_URL;

public class BaseIOSWebViewTest extends BaseIOSTest {
private static final Duration WEB_VIEW_DETECT_INTERVAL = Duration.ofSeconds(2);
private static final Duration WEB_VIEW_DETECT_DURATION = Duration.ofSeconds(30);

@BeforeAll
public static void beforeClass() {
public static void beforeClass() throws IOException {
startAppiumServer();

XCUITestOptions options = new XCUITestOptions()
.setPlatformVersion(PLATFORM_VERSION)
.setDeviceName(DEVICE_NAME)
.setWdaLaunchTimeout(WDA_LAUNCH_TIMEOUT)
.setCommandTimeouts(Duration.ofSeconds(240))
.setApp(VODQA_ZIP);
.setApp(new URL(IOS_SIM_VODQA_RELEASE_URL));
if (PREBUILT_WDA_PATH != null) {
options.usePreinstalledWda().setPrebuiltWdaPath(PREBUILT_WDA_PATH);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package io.appium.java_client.ios;

import io.appium.java_client.NoSuchContextException;
import io.appium.java_client.TestUtils;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.time.Duration;
import java.util.Map;

import static io.appium.java_client.TestUtils.waitUntilTrue;
import static io.appium.java_client.utils.TestUtils.waitUntilTrue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan;
import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.appium.java_client.ios;

import io.appium.java_client.AppiumBy;
import io.appium.java_client.TestUtils;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.By;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

package io.appium.java_client.service.local;

import io.appium.java_client.TestUtils;
import io.appium.java_client.ios.BaseIOSTest;
import io.appium.java_client.ios.IOSDriver;
import io.appium.java_client.ios.options.XCUITestOptions;
import io.appium.java_client.remote.AutomationName;
import io.appium.java_client.remote.MobilePlatform;
import io.appium.java_client.service.local.flags.GeneralServerFlag;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.Capabilities;
import org.openqa.selenium.Platform;
Expand Down
Binary file removed src/e2eIosTest/resources/vodqa.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

package io.appium.java_client.pagefactory_tests;

import io.appium.java_client.TestUtils;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import io.appium.java_client.pagefactory.HowToUseLocators;
import io.appium.java_client.pagefactory.Widget;
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.WebDriver;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.appium.java_client.plugin;

import io.appium.java_client.TestUtils;
import io.appium.java_client.plugins.storage.StorageClient;
import io.appium.java_client.utils.TestUtils;
import org.junit.jupiter.api.Assumptions;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package io.appium.java_client;
package io.appium.java_client.utils;

import org.jspecify.annotations.Nullable;
import org.openqa.selenium.Dimension;
Expand All @@ -18,6 +18,9 @@
import java.util.function.Supplier;

public class TestUtils {
public static final String IOS_SIM_VODQA_RELEASE_URL =
"https://github.com/appium/VodQAReactNative/releases/download/v1.0.1/VodQAReactNative-simulator-release.zip";

private TestUtils() {
}

Expand Down