问题描述
路径将具有n个资产。我想将图像名称从excel传递到鼠标悬停并单击其中的子元素。我正在将以下代码用于此操作。
出现此错误:
selenium.common.exceptions.JavascriptException:消息:javascript 错误:无法在“文档”上执行“ elementsFromPoint”
for r in range(2,self.rows+1):
self.assetpath=XLUtils.readData(self.path,'Sheet1',r,1)
self.columns = XLUtils.readData(self.path,2)
self.driver.get(self.columns)
list = self.driver.find_elements_by_xpath(self.card_asset_xpath)
for i in list:
j = i.text
if j == self.assetpath:
self.logger.info("********** action started ******" +j)
assetcard = self.driver.find_element_by_xpath("//coral-card-title[contains(text(),'"+j+"')]")
optionselect = self.driver.find_element_by_xpath(self.optn_select_xpath)
action = ActionChains(self.driver)
action.move_to_element(assetcard).move_to_element(optionselect).click().perform()
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)