I'm using appium (18.1, from source) to automate mobile web on safari and chrome. It seems that element.click only works on safari if the element is in view - are other people finding this or are there good workarounds that I haven't found yet?
With the example of github's site (for non-logged in users), there is a 'enterprise' button at the bottom of the page on iPhone 4" Simulator and Samsung S4 (real)
// click on enterprise button, out of view
driver.find_elements(:xpath, "//a[@class='button blue']")[2].click # Works on android, but not on iPhone
post /element/5014/click
Selenium::WebDriver::Error::JavascriptError: start point is not within the bounds of the screen
// attempting to use scrollTo, not working for me on either android or ios, ios error below
driver.execute_script "mobile: scrollTo", driver.find_elements(:xpath, "//a[@class='button blue']")[2].ref
Selenium::WebDriver::Error::JavascriptError: 'null' is not an object (evaluating 'au.getElement('').scrollToVisible')
// yet...even when the element is out of view
driver.find_elements(:xpath, "//a[@class='button blue']")[2].displayed?
// true on both platforms
Thanks in advance
RG