In the appium documentation there is a Get Active Element.

There is also an example:

WebElement currentElement = driver.switchTo().activeElement(); 

I used it in my example:

 public class Run_test extends Base_metod { public static void main(String[] args) { Base_metod.appium_option_asus(); wait_element("mobi.sevenwinds.askedo:id/iv_logo"); wait_element("mobi.sevenwinds.askedo:id/tv_city"); WebElement currentElement = driver.switchTo().activeElement(); } 

The compiler gives an error:

 янв 21, 2019 5:05:46 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0 INFO: Detected dialect: W3C янв 21, 2019 5:05:48 PM org.openqa.selenium.remote.ErrorCodes toStatus INFO: HTTP Status: '404' -> incorrect JSON status mapping for 'unknown method' (405 expected) Exception in thread "main" org.openqa.selenium.UnsupportedCommandException: Method has not yet been implemented Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:48' System info: host: 'DESKTOP-CEFCODO', ip: '10.0.75.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_191' Driver info: io.appium.java_client.android.AndroidDriver Capabilities {appActivity: mobi.sevenwinds.askedo.gui...., appPackage: mobi.sevenwinds.askedo, databaseEnabled: false, desired: {appActivity: mobi.sevenwinds.askedo.gui...., appPackage: mobi.sevenwinds.askedo, deviceName: ASUS, noReset: false, platformName: android, platformVersion: 5.0.2, udid: F9AZCY09Y655}, deviceManufacturer: asus, deviceModel: ASUS_Z00UD, deviceName: F9AZCY09Y655, deviceScreenSize: 1080x1920, deviceUDID: F9AZCY09Y655, javascriptEnabled: true, locationContextEnabled: false, networkConnectionEnabled: true, noReset: false, platform: LINUX, platformName: Android, platformVersion: 5.0.2, takesScreenshot: true, udid: F9AZCY09Y655, warnings: {}, webStorageEnabled: false} Session ID: a88ac3bd-7fb1-4c7c-a195-4bb1125dc398 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:187) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:122) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:49) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:158) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:46) 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$RemoteTargetLocator.activeElement(RemoteWebDriver.java:927) at Android.Run_test.main(Run_test.java:25) 

MB, who knows how to use it correctly?

    0