关于div属性是non_visible的问题:用js remove 属性

上一篇 / 下一篇  2013-01-17 10:09:33 / 个人分类:Selenium

Element is not currently visible and so may not be interacted with...
 
 
WebDriver driver; // Assigned elsewhere
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("document.getElementById('//elementID').removeAttr('display');");

TAG:

MillionRoses 引用 删除 dian106106   /   2013-01-17 10:40:37
用action:
WebElement foo = driver.findElement(By.xpath("//span[text()='Clone concept']"));
Actions bar = new Actions(driver);
bar.click(foo).perform();
MillionRoses 引用 删除 dian106106   /   2013-01-17 10:13:23
google: http://stackoverflow.com/questions/8589232/element-is-not-currently-visible-and-so-may-not-be-interacted-with
 

评分:0

我来说两句

日历

« 2024-05-12  
   1234
567891011
12131415161718
19202122232425
262728293031 

数据统计

  • 访问量: 74617
  • 日志数: 80
  • 建立时间: 2012-04-12
  • 更新时间: 2013-05-21

RSS订阅

Open Toolbar