Answer the question
In order to leave comments, you need to log in
Why does Selenium write Exception... "Component not initialized"?
There is a piece of code where I can't figure out what the error is.
So:
def delete_widget(self, widget):
try:
<b>button_delete_widget = widget.find_element_by_css_selector("i.icon-trash.icon-2x")</b>
except NoSuchElementException:
self.add_widget(widget)
sleep(WAIT_PERIOD)
self.driver.switch_to.window(self.driver.window_handles[-1])
button_delete_widget = widget.find_element_by_css_selector("i.icon-trash.icon-2x")
button_delete_widget.click()
self.wait_and_accept_allert(count=1)
def add_widget(self, widget):
element.click()
Answer the question
In order to leave comments, you need to log in
NS_ERROR_NOT_INITIALIZED (0xC1F30001)
An attempt was made to use a component or object which has not yet been initialized. These components usually provide an initialization method, often called Init, which must be called before other methods are used.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question