${get_t}= Get Text //h6[@class='MuiTypography-root MuiTypography-subtitle2']
Log ${get_t}
${get_t1}= Get Element Count xpath://h6[@class='MuiTypography-root MuiTypography-subtitle2']
Log ${get_t1}
${get_t3}= Get WebElements xpath://h6[@class='MuiTypography-root MuiTypography-subtitle2']
Log ${get_t3}
当我获取计数时,它会显示计数,但当我使用get WebElements打印它时,它不会打印文本。如果我给Get Text它会单独打印第一个文本
您希望实现什么-获取/打印每个元素的文本?因为
Get Webelements
只做它的名字所说的-返回匹配元素的列表-selenium元素对象。 这样,如果您想打印每个成员的文本,只需在列表上迭代并对每个成员调用Get Text
:相关问题 更多 >
编程相关推荐