Search code examples
touchwebdriver

WEbdriver with Touch events


I wanted to use touch/tap events in Selenium WebDriver using Java code for iOS iPad or Android tablets.

How can I do this?


Solution

  • Yes there is AndroidDriver that you can use to test a web application / web site on an Android device.
    Link: Android WebDriver
    For iOS, there is WebDriver for iPhone
    Link: iPhone WebDriver
    Also, do check this: WebDriver for Mobile Browsers

    Since, the drivers are for automation testing of web views/pages they don't have out of the box touch/tap events like native app automation frameworks.
    You should try to use jQuery Mobile API to perform touch/tap events on web-pages. Use JavascriptExecutor of selenium webdriver and execute jquery using the executor.
    Check this: jQuery Mobile Tap