代码优化4

    xiaoxiao2021-03-25  137

    后:

    public void selectPlayerAndClick(String memberID){ //WebElement table = driver.findElement(By.cssSelector("table[id$='GridView_Appeal']")); //WebElement player = table.findElement(By.xpath("//tr//td[position()=2 and contains(*|text(), '" + memberID + "')]/../td[3]/a")); WebElement player = driver.findElement(By.xpath("//table[contains(@id,'GridView_Appeal')]//tr//td[position()=2 and contains(*|text(), '" + memberID + "')]/../td[3]/a")); log.info(player.getText()); player.click(); }

    转载请注明原文地址: https://ju.6miu.com/read-11629.html

    最新回复(0)