Running Selenium webdriver scripts in android device (Samsung galaxy tab)-Portrait mode

  • I have been stuck in an issue while running selenium webdriver script in android device -Portrait mode. Script is running successfully in landscape mode but when we run the same script in android device keeping device in portrait mode script is failing for few actions like clicking the link, even though object locator remains same.

    Script is like below:

    @emerson public void testUntitled() throws Exception {
        driver.get("application uRl");
     //below line throws exception

    Note: First two statements execute successfully in portrait mode. However the third statement driver.findElement(By.cssSelector("")).click(); fails (in portrait mode) and throws the below exception:

    org.openqa.selenium.ElementNotVisibleException: This WebElement is not visisble and may not be clicked.
    Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
    System info: 'Linux', os.arch: 'armv7l', os.version: '', java.version: '0'
    Driver info: driver.version: unknown
    Command duration or timeout: 322 milliseconds
    Build info: version: '2.32.0', revision: '6c40c18', time: '2013-04-09 17:22:56'
    System info: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_40'
    Session ID: 1385108177533
    Driver info:
    Capabilities [{platform=ANDROID, acceptSslCerts=true, javascriptEnabled=true, handlesAlerts=true, browserName=android, browserConnectionEnabled=true, webStorageEnabled=true, rotatable=true, locationContextEnabled=true, applicationCacheEnabled=true, webdriver.remote.sessionid=1385108177533, takesScreenshot=true, version=13}]

    Please suggest how this issue can be resolved. Is there any settings to be done for running script in portrait mode?

Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2