In IOS mobile app technology is React native, locators are merged with all the elements in a single page
IOS locators 1
Appium2 uses python to operate the simulator installed in the wechat software automation driver.find_elements(By.CLASS_NAME, “android.widget.Button”)
There is no problem with the automatic operation in front of the program, only here there are always 500 exceptions, and there is no problem with loading. # 查找所有android.widget.Button的text def find_elements_with_retry(driver, by, value, retries=3, delay=5): for attempt in range(retries): try: elements = driver.find_elements(by, value) if elements: return elements except Exception as e: logging.error(f”Error finding elements: […]
Failed configuration in @before test and @after Test
FAILED CONFIGURATION: @BeforeClass RashmiPractice.AppiumTest.BaseTest.serverstart
java.lang.NoSuchMethodError: ‘void org.openqa.selenium.remote.http.ClientConfig.(java.net.URI, java.time.Duration, java.time.Duration, org.openqa.selenium.remote.http.Filter, java.net.Proxy, org.openqa.selenium.Credentials)’
at io.appium.java_client.AppiumClientConfig.(AppiumClientConfig.java:62)
at io.appium.java_client.AppiumClientConfig.defaultConfig(AppiumClientConfig.java:79)
at io.appium.java_client.remote.AppiumCommandExecutor.(AppiumCommandExecutor.java:109)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:101)
at io.appium.java_client.android.AndroidDriver.(AndroidDriver.java:113)
at RashmiPractice.AppiumTest.BaseTest.serverstart(BaseTest.java:39)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:139)
at org.testng.internal.invokers.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:69)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:393)
at org.testng.internal.invokers.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:326)
at org.testng.internal.invokers.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:180)
at org.testng.internal.invokers.TestMethodWorker.run(TestMethodWorker.java:122)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at org.testng.TestRunner.privateRun(TestRunner.java:819)
at org.testng.TestRunner.run(TestRunner.java:619)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:443)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:437)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:397)
at org.testng.SuiteRunner.run(SuiteRunner.java:336)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:95)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1228)
at org.testng.TestNG.runSuites(TestNG.java:1134)
at org.testng.TestNG.run(TestNG.java:1101)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Appium org.openqa.selenium.UnsupportedCommandException: The requested resource could not be found
I have just copied the project, I have the same code and pom of my colleagues and it works for them.