在android设备中运行Selenium webdriver脚本(Samasung galaxy选项卡)-纵向模式
在android设备肖像模式下运行SeleniumJavaWebDriver脚本时,我遇到了一个问题。 脚本在横向模式下成功运行,但当我们在android设备上运行相同的脚本时,将设备保持在纵向模式下,脚本在一些操作中失败 与单击链接类似,尽管对象定位器保持不变。 脚本如下所示在android设备中运行Selenium webdriver脚本(Samasung galaxy选项卡)-纵向模式,android,selenium-webdriver,Android,Selenium Webdriver,在android设备肖像模式下运行SeleniumJavaWebDriver脚本时,我遇到了一个问题。 脚本在横向模式下成功运行,但当我们在android设备上运行相同的脚本时,将设备保持在纵向模式下,脚本在一些操作中失败 与单击链接类似,尽管对象定位器保持不变。 脚本如下所示 @Test public void testUntitled() throws Exception { driver.get("application uRl"); driver.findEleme
@Test
public void testUntitled() throws Exception {
driver.get("application uRl");
driver.findElement(By.xpath("//ul[2]/li[2]/a/div")).click();
driver.findElement(By.cssSelector("<css selector>")).click();
}
请建议如何解决这个问题。在纵向模式下运行脚本是否需要进行任何设置?
提前谢谢
org.openqa.selenium.ElementNotVisibleException: This WebElement is not visisble and may not be clicked.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: os.name: 'Linux', os.arch: 'armv7l', os.version: '2.6.36.3', 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: os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_40'
Session ID: 1385108177533
Driver info: org.openqa.selenium.android.AndroidDriver
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}]