selenium怎么定位頁面彈窗的元素?
定位頁面元素//通過Id定位元素WebElement element = driver.findElement(By.id(“id名"))
;//通過name定位元素WebElement element = driver.findElement(By.name(“name名"))
;//通過xpath定位元素WebElement element = driver.findElement(By.xpath(“xpath路徑"))
;//通過標簽的值定位元素WebElement cheese = driver.findElement(By.linkText(“標簽的值"))
;//通過class的值定位元素List list=driver.findElements(By.className(“class值"))
;//通過標簽名定位元素List list = driver.findElements(By.tagName(“標簽名"));