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