A path will have n number of assets. I want to pass the image name from an excel to which it has to mouse hover and click the subelement present in it. I am using the below code for this action.
Getting this error:
selenium.common.exceptions.JavascriptException: Message: javascript error: Failed to execute 'elementsFromPoint' on 'Document'
for r in range(2,self.rows+1):
self.assetpath=XLUtils.readData(self.path,'Sheet1', r, 1)
self.columns = XLUtils.readData(self.path, 'Sheet1', r, 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()