I am fairly new to Appium and i am currently working on UI testing of an application. I want to click an element but it is not visible until you scroll down the page.
I have tried using the command below but it does not work for me
driver.findElement(By.xpath("new UiScrollable(new UiSelector().scrollable(true).instance(0)).scrollIntoView(new UiSelector().textContains("WebView").instance(0))")).click();
CodePudding user response:
You need to replace "By.xpath" with "MobileBy.AndroidUIAutomator".
See Appium's documentation.