I am trying to scroll on webview in both android and iOS. But scrollTo method does not support for webview.
Is there any other way to achieve this ?
I am trying to scroll on webview in both android and iOS. But scrollTo method does not support for webview.
Is there any other way to achieve this ?
can you please check “ScrollAble” properties in UIAutomator for that element?
Thanks,
Priyank Shah
Here is how I scroll in web views for iOS
driver.context("WEBVIEW_2"); //Switch to the context - find this in appium inspector
driver.switchTo().frame("manageFrame"); //Switch to the frame in which your element is found
WebElement editSecurity = driver.findElement(By.xpath("//div[contains(@class,'enhanced')]//a[@class='editSection']")); //Create a web element of the item you want to scroll to
((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView(true);" , editSecurity);
Hi @JasmineJames,
Solution above helps, but scrolls past the required element on webview.
Could you please help in this regard?
I tried Android Driver’s scrollTo and scrolltoExact methods but same behaviour is observed
Thanks,
Sujata
Sorry for the late response. I can only speak in regards to iOS. I don’t test Android at all. Perhaps start a new thread for this issue.