How to get WebElement text with selenium

前端 未结 2 1824
心在旅途
心在旅途 2021-01-18 05:56

Please see the following element:

User \'M
2条回答
  •  失恋的感觉
    2021-01-18 06:33

    WebElement element = driver.findElement(By.className("div.success")
    element.getText();
    

    shall help you get the text of the div

提交回复
热议问题