Selenium python麻烦查找元素

问题描述 投票:0回答:1

enter image description here

我正在尝试访问突出显示的图像,但是遇到麻烦,我尝试了XPATH和CSS SELECTOR,但似乎都无法正常工作。使用Selenium w python和chrome btw

python selenium google-chrome
1个回答
1
投票

在xpath下尝试:

  //div[@class='Practice_Question_Body']//p

1
投票
text = driver.find_element_by_class_name('Pratice_Question_boy')
textHtml =text.get_attribute('innerHTML')
© www.soinside.com 2019 - 2024. All rights reserved.