以下面的代码为例,把变量change放到字符串“//span[text()='" + change+ "']/../../span/a”中
具体格式就是:'" + change+ "'

change = json_data['亚瑟']
self.driver.find_elements_by_xpath("//span[text()='" + change+ "']/../../span/a")[0].click()

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2021-10-12
  • 2022-12-23
猜你喜欢
  • 2021-12-15
  • 2022-12-23
  • 2022-12-23
  • 2021-07-16
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案