Comments (6)
scrollTo is not working with iOS 6.1/7.1 and how can i scroll to elements inside a UIWebView when in hybrid context?
from java-client.
in a webview context we're using the webdriver javascript atoms to get selenium webdriver functionality. and there is no scroll_to with this api. you should use javascript, just set window.scrollTop to the position of the element you want.
from java-client.
okay. can you please provide a few lines of sample code.
- i tried "scrollTo", which will not work in webviews as you explained, but i does not work in ios native either.
- i tried "mobile: scroll" via driver.executeScript, which worked in ios native, but got an not implemented exception in webview context
Furthermore shouldnt scrollTo be deprecated? Because it uses complexFind, which "is deprecated" according to the appium docs. Lastly, could you explain, what complexFind really does? i didnt find anything about that in the docs or code.
thanks.
from java-client.
Furthermore shouldnt scrollTo be deprecated?
Yes :-)
Lastly, could you explain, what complexFind really does? i didnt find anything about that in the docs or code.
Unfortunately I never had a good idea of what complexFind does. It was specifically for Android and has been superseded by the -uiautomator locator strategy. And it never worked in a mobile context anyway.
In terms of an example unfortunately I don't have time to put one together. But the key point is to use executeScript to run some javascript. You can look up how to use javascript to scroll a window, there's plenty of info online.
from java-client.
okay thanks, i will let you know, if i find a solution.
Are there any plans to put a real scroll method into the AppiumDriver class?
What does the "mobile: scroll" do behind the scenes? Is it javascript running in instruments and therefore does not work for webviews?
from java-client.
yes it uses a special instruments command that scrolls a view. the reason we have it is that swipe does not work on some views because the simulator has broken gesture recognition for some views.
from java-client.
Related Issues (20)
- Do you plan to provide an extended Driver like UiAutomator2Options?
- getImagesSimilarity(byte[] base64image1, byte[] base64Image2) is not supported by the mapped resource HOT 3
- org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure. HOT 2
- IOSFindBy & AndroidFindBy with parametrs HOT 1
- Unable to find Element in PageFactory
- Appium compatibility issue: Need appium version that is compatible with Selenium 4.18.1 HOT 8
- I got an issue for appium automation using java SyntaxError: Cannot use import statement outside a module
- Appium 2.0: Not able to click on image locator HOT 2
- startLogcatBroadcast does not respect https
- Android - Error when trying to use sendKey or clear function on WebElement obtained with driver.findElement(new AppiumBy.ByAndroidViewTag("myTag")); HOT 1
- Did you stop prefixing capabilities with 'appium:' in the latest java client? HOT 3
- [Issue]: Original error: Appium Settings app is not running after 5000ms HOT 5
- [Issue]: Original error: Appium Settings app is not running after 5000ms HOT 2
- This repository's wiki links to non-existent pages. (404) HOT 4
- How to continue execution even after the step failed in cucumber 7.18.0 HOT 1
- java.lang.NoClassDefFoundError: org/openqa/selenium/HasDownloads HOT 4
- Exception is Cannot invoke "io.appium.java_client.android.AndroidDriver.navigate()" because "this.driver" is null HOT 1
- For me not getting how to navigate the once the app was login and home page is displayed but for me not getting how to navigate home page to another page
- Not able to start appium server in eclipse console HOT 6
- Appium with Java: Selenium 4.11.0 Appium 8.6.0 , Could not start a new session. Response code 400. Message: Missing command parameter: appId HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-client.