0

我的代码:

if "0" in self.br.find_element_by_xpath("//*[@id='counter']").text:

正在尝试在以下 html 部分中找出它是否为 0

<span style="color: green;" id="counter">1</span>

我的代码似乎不起作用...不知道为什么,因为它是数字而不是字母?我在页面的其他部分有这样的功能,它工作正常。

4

0 回答 0