We have a webpage that has dynamic elements. When the page is loaded in a mobile device, the elements are created depending on the mobile device.
With the Android Webdriver, when I am tapping an element, it does not line up with the actual element.
Snippet:
require "selenium-webdriver"
require "selenium/client"
include Selenium::WebDriver::DriverExtensions::HasTouchScreen
caps = Selenium::WebDriver::Remote::Capabilities.android
client = Selenium::WebDriver::Remote::Http::Default.new
client.timeout = 480
driver = Selenium::WebDriver.for(
:remote,
:url => "http://localhost:8080/wd/hub",
:http_client => client,
:desired_capabilities => caps)
driver.navigate.to "my page"
next_button = driver.find_element(:css, "div[id='next_button']")
driver.touch.single_tap(next_button).perform
When tapping the element, it is tapping in a different area not related to the actual element.
Any help or ideas would be greatly appreciated.
Thanks!