${get_t}= Get Text //h6[@class='MuiTypography-root MuiTypography-subtitle2']${get_t1}= Get Element Count xpath://h6[@class='MuiTypography-root MuiTypography-subtitle2']
Log${get
我无法从元素中获取文本。我认为它是一个动态添加到元素的文本(来自Angular),因此不会直接加载到元素中。元素内的文本具有例如"3“的格式,其中ut周围带有引号。from selenium import webdriverimport time
from selenium.common.exceptions
如何使用selenium从这种形式的html文件中提取值: <body> <span class="some other stuff">the number wanted</span></body> 我尝试在元素上使用get_attribute函数,但只能返回类。到目前为止的代码 from seleniu
我正在试图找到使用Xpath/Selenium的情况,在超链接之前没有空白。this<a href="#">link</a>to access the data</p>`问题:定位所有<a>元素有什么优雅的方法可以在锚之前/之后得到文本吗?我正在考虑使用XPath查询,例如//a/parent::*,它返回<p>