Здравствуйте, я новичок в Appium и Selenium WebDriver, поэтому для некоторых из вас вопрос может показаться простым.
- Appium Version: 2.10.3
- OS: Windows 10
Ниже приведена реализация тестового класса на Java:
`import io.appium.java_client.AppiumDriver;
import io.appium.java_client.android.AndroidDriver;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import org.openqa.selenium.remote.DesiredCapabilities;
import java.net.MalformedURLException;
import java.net.URL;
import static io.appium.java_client.remote.AndroidMobileCapabilityType.APP_ACTIVITY;
public class AdminsTest {
private String login = “muzhev@mailhog.arnica.pro”;
private String password = “12345qwert”;
private AppiumDriver driver;
MobileObjects mobileObjects;
@BeforeEach
public void setUp() throws MalformedURLException {
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("platformName", "android");
desiredCapabilities.setCapability("appium:deviceName", "Samsung");
desiredCapabilities.setCapability("appium:appPackage", "com.chernoivanarnicapro.app");
desiredCapabilities.setCapability("appium:appActivity", "com.chernoivanarnicapro.app.MainActivity");
desiredCapabilities.setCapability("appium:automationName", "uiautomator2");
desiredCapabilities.setCapability("appium:ensureWebviewsHavePages", true);
desiredCapabilities.setCapability("appium:nativeWebScreenshot", true);
desiredCapabilities.setCapability("appium:newCommandTimeout", 3600);
desiredCapabilities.setCapability("appium:connectHardwareKeyboard", true);
desiredCapabilities.setCapability("appWaitActivity", APP_ACTIVITY);
// desiredCapabilities.setCapability(“appWaitDuration”, 50000);
// desiredCapabilities.setCapability(“appWaitPackage”, APP_PACKAGE);
// desiredCapabilities.setCapability(“appium:avd”, “emulator-5554”);
// desiredCapabilities.setCapability(“appium:noReset”, true);
URL remoteUrl = new URL("http://127.0.0.1:4723");
driver = new AndroidDriver(remoteUrl, desiredCapabilities);
// driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
mobileObjects = new MobileObjects(driver);
}
@Test
@DisplayName("Переключение расписания на следующий месяц и предыдущий")
public void sampleTest() {
mobileObjects.buttonLogin.isDisplayed();
mobileObjects.buttonLogin.click();
mobileObjects.loginField.isDisplayed();
mobileObjects.loginField.sendKeys(login);
mobileObjects.passwordField.isDisplayed();
mobileObjects.passwordField.sendKeys(password);
mobileObjects.buttonLogin.isDisplayed();
mobileObjects.buttonLogin.click();
}
@AfterEach
public void tearDown() {
driver.quit();
}
}`
Класс MobileObjects:
`import io.appium.java_client.AppiumDriver;
import io.appium.java_client.MobileElement;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.support.PageFactory;
import java.time.Duration;
public class MobileObjects {
private AppiumDriver driver;
@AndroidFindBy(xpath = "//android.widget.Button[@content-desc=\"Войти\"]")
// @AndroidFindBy(className = “android.widget.Button”)
public MobileElement buttonLogin;
@AndroidFindBy(xpath = "(//android.widget.EditText[@resource-id=\"text-input-outlined\"])[1]")
public MobileElement loginField;
@AndroidFindBy(xpath = "//android.widget.EditText[@resource-id=\"text-input-outlined\" and @text=\" \"]")
public MobileElement passwordField;
MobileObjects(AppiumDriver driver) {
PageFactory.initElements(new AppiumFieldDecorator(driver, Duration.ofSeconds(10)), this);
this.driver = driver;
}
}`
Ошибка из IDEA после запуска теста:
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.chernoivanarnicapro.app' application. Consider checking the driver's troubleshooting documentation. Original error: 'appActivity' or 'com.chernoivanarnicapro.app.appActivity' never started. Consider checking the driver's troubleshooting documentation. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'WIN-G84FA5F2AVE', ip: '192.168.1.150', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.2' Driver info: driver.version: AndroidDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.chernoivanarnicapro.app' application. Consider checking the driver's troubleshooting documentation. Original error: 'appActivity' or 'com.chernoivanarnicapro.app.appActivity' never started. Consider checking the driver's troubleshooting documentation. at getResponseForW3CError (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\errors.js:1145:9) at asyncHandler (C:\Users\user\AppData\Roaming\npm\node_modules\appium\node_modules\@appium\base-driver\lib\protocol\protocol.js:485:57) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'WIN-G84FA5F2AVE', ip: '192.168.1.150', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '21.0.2' Driver info: driver.version: AndroidDriver at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:216) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:225) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:250) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:363) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37) at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:89) at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:99) at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:97) at org.ittechnology.ru.admins.AdminsTest.setUp(AdminsTest.java:46) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptBeforeEachMethod(TimeoutExtension.java:78) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:520) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeBeforeEachMethodAdapter$23(ClassBasedTestDescriptor.java:505) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachMethods$3(TestMethodTestDescriptor.java:174) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:202) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:202) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachMethods(TestMethodTestDescriptor.java:171) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:134) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:68) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at java.base/java.util.ArrayList.forEach(ArrayList.java:1596) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141) at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137) at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138) at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95) at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35) at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57) at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67) at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114) at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86) at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:119) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:94) at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:89) at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:62) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36) at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24) at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33) at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94) at jdk.proxy1/jdk.proxy1.$Proxy2.stop(Unknown Source) at org.gradle.api.internal.tasks.testing.worker.TestWorker$3.run(TestWorker.java:193) at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100) at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60) at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113) at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65) at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69) at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74) Suppressed: java.lang.NullPointerException: Cannot invoke "io.appium.java_client.AppiumDriver.quit()" because "this.driver" is null at org.ittechnology.ru.admins.AdminsTest.tearDown(AdminsTest.java:71) at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) at java.base/java.lang.reflect.Method.invoke(Method.java:580) at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:727) at org.junit.jupiter.engine.execution.MethodInvocation.proceed(MethodInvocation.java:60) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$ValidatingInvocation.proceed(InvocationInterceptorChain.java:131) at org.junit.jupiter.engine.extension.TimeoutExtension.intercept(TimeoutExtension.java:156) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptLifecycleMethod(TimeoutExtension.java:128) at org.junit.jupiter.engine.extension.TimeoutExtension.interceptAfterEachMethod(TimeoutExtension.java:110) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker$ReflectiveInterceptorCall.lambda$ofVoidMethod$0(InterceptingExecutableInvoker.java:103) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.lambda$invoke$0(InterceptingExecutableInvoker.java:93) at org.junit.jupiter.engine.execution.InvocationInterceptorChain$InterceptedInvocation.proceed(InvocationInterceptorChain.java:106) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.proceed(InvocationInterceptorChain.java:64) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.chainAndInvoke(InvocationInterceptorChain.java:45) at org.junit.jupiter.engine.execution.InvocationInterceptorChain.invoke(InvocationInterceptorChain.java:37) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:92) at org.junit.jupiter.engine.execution.InterceptingExecutableInvoker.invoke(InterceptingExecutableInvoker.java:86) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.invokeMethodInExtensionContext(ClassBasedTestDescriptor.java:520) at org.junit.jupiter.engine.descriptor.ClassBasedTestDescriptor.lambda$synthesizeAfterEachMethodAdapter$24(ClassBasedTestDescriptor.java:510) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAfterEachMethods$10(TestMethodTestDescriptor.java:243) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$13(TestMethodTestDescriptor.java:276) at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73) at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeAllAfterMethodsOrCallbacks$14(TestMethodTestDescriptor.java:276)
Ошибка из Appium после запуска теста:
[ADB] Found package: 'com.chernoivanarnicapro.app' and fully qualified activity name : 'com.chernoivanarnicapro.app.MainActivity' [ADB] Incorrect package and activity. Retrying. [ADB] Getting focused package and activity [ADB] Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s fb13e469 shell dumpsys window displays' [ADB] Found package: 'com.chernoivanarnicapro.app' and fully qualified activity name : 'com.chernoivanarnicapro.app.MainActivity' [ADB] Incorrect package and activity. Retrying. [ADB] Getting focused package and activity [ADB] Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s fb13e469 shell dumpsys window displays' [ADB] Found package: 'com.chernoivanarnicapro.app' and fully qualified activity name : 'com.chernoivanarnicapro.app.MainActivity' [ADB] Incorrect package and activity. Retrying. [AndroidUiautomator2Driver@f4e9] Deleting UiAutomator2 session [AndroidUiautomator2Driver@f4e9] Deleting UiAutomator2 server session [AndroidUiautomator2Driver@f4e9] Matched '/' to command name 'deleteSession' [AndroidUiautomator2Driver@f4e9] Proxying [DELETE /] to [DELETE http://127.0.0.1:8200/session/43ebd7b1-c389-4438-aef4-97f418bcfc33] with no body [AndroidUiautomator2Driver@f4e9] Got response with status 200: {"sessionId":"43ebd7b1-c389-4438-aef4-97f418bcfc33","value":null} [ADB] Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s fb13e469 shell dumpsys activity services io.appium.settings/.recorder.RecorderService' [ADB] Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s fb13e469 shell am force-stop com.chernoivanarnicapro.app' [Logcat] Stopping logcat capture [ADB] Removing forwarded port socket connection: 8200 [ADB] Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s fb13e469 forward --remove tcp:8200' [AndroidUiautomator2Driver@f4e9] Restoring hidden api policy to the device default configuration [ADB] Running 'C:\Users\user\AppData\Local\Android\Sdk\platform-tools\adb.exe -P 5037 -s fb13e469 shell 'settings delete global hidden_api_policy_pre_p_apps;settings delete global hidden_api_policy_p_apps;settings delete global hidden_api_policy'' [AppiumDriver@4434] Event 'newSessionStarted' logged at 1719560529428 (12:42:09 GMT+0500 (Екатеринбург, стандартное время)) [AppiumDriver@4434] Encountered internal error running command: Error: Cannot start the 'com.chernoivanarnicapro.app' application. Consider checking the driver's troubleshooting documentation. Original error: 'appActivity' or 'com.chernoivanarnicapro.app.appActivity' never started. Consider checking the driver's troubleshooting documentation. at ADB.startApp (C:\Users\user\.appium\node_modules\appium-uiautomator2-driver\node_modules\appium-adb\lib\tools\apk-utils.js:213:11) at AndroidUiautomator2Driver.ensureAppStarts (C:\Users\user\.appium\node_modules\appium-uiautomator2-driver\lib\driver.ts:809:5) at AndroidUiautomator2Driver.performSessionPostExecSetup (C:\Users\user\.appium\node_modules\appium-uiautomator2-driver\lib\driver.ts:632:7) at AndroidUiautomator2Driver.startUiAutomator2Session (C:\Users\user\.appium\node_modules\appium-uiautomator2-driver\lib\driver.ts:680:5) at AndroidUiautomator2Driver.createSession (C:\Users\user\.appium\node_modules\appium-uiautomator2-driver\lib\driver.ts:402:22) at AppiumDriver.createSession (C:\Users\user\AppData\Roaming\npm\node_modules\appium\lib\appium.js:731:35) [HTTP] <-- POST /session 500 31407 ms - 1110 [Instrumentation] . [Instrumentation] Time: 26,097
При выполнении команды «adbshell dumpsys window windows» выводится следующая информация:
` mGlobalConfiguration={1.1 250mcc20mnc [ru_RU,en_US] ldltr sw411dp w411dp h773dp 280dpi nrml long port finger -keyb/v/h -nav/h winConfig={ mBounds=Rect(0, 0 - 720, 1480) mAppBounds=Rect(0, 0 - 720, 1396) mWindowingMode=fullscreen mDisplayWindowingMode=fullscreen mActivityType=undefined mAlwaysOnTop=undefined mRotation=ROTATION_0} s.631 bts=0 ff=0 bf=0 themeSeq=0} mHasPermanentDpad=false
mTopFocusedDisplayId=0
mInTouchMode=true
mLastDisplayFreezeDuration=+357ms due to Window{b953aff u0 com.android.systemui}
mLastWakeLockHoldingWindow=null mLastWakeLockObscuringWindow=Window{6b5c9c3 u0 com.android.systemui.ImageWallpaper}
mFullSnapshotScale=1.0
SnapshotCache
MaxSnapshotCache=5
mTraversalScheduled=false
mHoldScreenWindow=null
mObscuringWindow=Window{3dd4364 u0 com.chernoivanarnicapro.app/com.chernoivanarnicapro.app.MainActivity}
mSystemBooted=true mDisplayEnabled=true
mTransactionSequence=53554
mDisplayFrozen=false windows=0 client=false apps=0 mRotation=0 mLastWindowForcedOrientation=-1 mLastOrientation=1
waitingForConfig=false
Animation settings: disabled=false window=1.0 transition=1.0 animator=1.0
PolicyControl.sImmersiveStatusFilter=null
PolicyControl.sImmersiveNavigationFilter=null
PolicyControl.sImmersivePreconfirmationsFilter=null
WINDOW MANAGER EXTENSION (dumpsys window extension)
mHasOneHandOpSpec=false
CustomAspectRatioController
mCustomAspectRatioModeEnabled=true
mCurrentDisplayAspectRatio=2.0556, mMarginForAlignmentMargin=92
mIsNightMode=false, mPaddingSize=10, mTextSize=28, mChangeAspectRatioBarLimit=33
PackageConfigurationController is null`
При текущих настройках желаемых возможностей страница приложения загружается, но никаких дальнейших действий не предпринимается. Если описываю тест без использования PageObject и PageFactory в одном классе, то скрипт выполняется успешно.
Приложение написано на React Native, возможно проблема с этим, но как тогда обработать взаимодействие?
Прошу помочь в решении проблемы.
Спасибо заранее за ваше время!