1

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()

enter image description here

Roman Patutin
  • 2,171
  • 4
  • 23
  • 27
  • Could you please provide a link to the website –  Sep 10 '20 at 11:07
  • sorry about that. It's confidential. I tried to post an image it is not allowing here. For imagination, I can guide you. Each image is like a card, think there will be 6 cards naming A, B,C,D,E,F. I want to mouse hover on D. On mouse hover you will get 3 options on top of that card. I want to click on 1 option. Hope this helps. Thank you – chaitanya shirodkar Sep 10 '20 at 11:17
  • Post the html code of the webpage – Dev Sep 10 '20 at 11:38

0 Answers0