0
public void testSuccess() throws InterruptedException {
System.out.println("test arribute popup");
Thread.sleep(3000);
WebElement searchBtn = driver.findElement(By.xpath(".//*[@id='investedList']/span/span[2]/span"));
Actions action = new Actions(driver);
action.moveToElement(searchBtn).perform();
Thread.sleep(3000);
}
當鼠標移動到按鈕有彈出文本顯示爲「投資清單」 如何測試這個使用硒如何測試文本,其彈出時,鼠標移動到按鈕,在硒
你試過方法'.Gettext();'? –
yes.it不起作用 –
首先您捕獲該文本的元素定位器。然後使用getText()函數來讀取文本。 –