An Error Has Occured in 'Site Url': Uncaught Typeerror: Cannot Read Property 'Getcolomnset' of Undefined with Selenium and Python

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:

    • Generic funtion to check if page has completely loaded in Selenium
  • 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)

  • Cannot read property 'getContext' of null, using canvas
  • Uncaught TypeError: Cannot read property 'getContext' of undefined
  • Uncaught Error remote.js

Cannot read property 'getContext' of null, using canvas

I guess the problem is your js runs before the html is loaded.

If you are using jquery, you can use the document ready function to wrap your code:

$(function() {
var Grid = function(width, height) {
// codes...
}
});

Or simply put your js after the <canvas>.



Related Topics



Leave a reply



Submit