An error has occured in ‘site url’: Uncaught TypeError: Cannot read property ‘getColomnSet’ of undefined with Selenium and Python

This error message…

An error has occured in 'site url': Uncaught TypeError: Cannot read property 'getColomnSet' of undefined

…implies that your program was unable to read the property getColomnSet while trying to download the desired file.

Possibly, the main problem is the js involved to download the document is invoked before the client renders the HTML DOM completely.

The relevant HTML, a bit more of your previous lines of code and the error stack trace would have given us some more idea about what’s going wrong.

Solution

  • You can induce some measures to wait till the complete DOM Tree is rendered following the discussion:
  • A couple of facts:
    • In your code trials I don’t see you interacting with the element (By.ID,'element_1_id') so possibly you can remove the step of presence_of_element_located() for the element (By.ID,'element_1_id').
    • If you still require presence_of_element_located((By.ID,'element_1_id')) catch the exception and initiate required steps.
    • As you invoke move_to_element() over elem1 and elem2 and moving ahead invoke perform() you need to induce WebDriverWait with expected_conditions as element_to_be_clickable(locator)

tl;dr (references)

Leave a Comment