自动化测试随笔5-记录工作中遇到的元素无法点击的问题

Timed out after 30 seconds waiting for element to be clickable: By.linkText:红苹果
解决方案:
     WebElement h1 = Common.scrollToElement(driver, By.className("ng-scope"));
			WebElement h2 = h.findElement(By.id("productDetailAddForm"));
			h2.findElement(By.xpath("div/div[18]")).click();

  

Element is not clickable at point (411, 675). Other element would receive the click: ..."
解决方案:
Actions action = new Actions(driver);
		WebElement we = Common.waitForElement(driver,By.xpath("/html/body/div[1]/div[2]/div[1]/div/ul[4]/li/a"));
		action.moveToElement(we).click().perform();

  

posted @ 2017-07-05 13:42  十年之光  阅读(367)  评论(0编辑  收藏  举报