Selenium WebDriver getText

后端 未结 8 2097
广开言路
广开言路 2021-01-06 21:07

I have a

0
.

I try to write a test that myDiv has 0 text in it. With WebDriver it is:

<
8条回答
  •  一整个雨季
    2021-01-06 21:30

    You can also verify the text in the div by:

    $browser.is_element_present("//div[@name='myDiv']/.[text()='0']")
    

提交回复
热议问题