Categories

1 Answer

Aug 22, 2019
Some of the exceptions I have faced in my current project are

ElementNotVisibleException

StaleElementReferenceException

Element Not visible Exception:

This exception will be thrown when you are trying to locate a particular element on webpage that is not currently visible eventhough it is present in the DOM. Also sometimes, if you are trying to locate an element with the xpath which associates with two or more element.

Stale Element Reference Exception:

A stale element reference exception is thrown in one of two cases, the first being more common than the second.

The two reasons for Stale element reference are

The element has been deleted entirely.

The element is no longer attached to the DOM.

We face this stale element reference exception when the element we are interacting is destroyed and then recreated again. When this happens the reference of the element in the DOM becomes stale. Hence we are not able to get the reference to the element.

Some other exceptions we usually face are as follows:

WebDriverException

IllegalStateException

TimeoutException

NoAlertPresentException

NoSuchWindowException

NoSuchElementException
Click here to read more about Selenium
Click here to read more about Insurance

Related questions

Madanswer
Aug 22, 2019 in Selenium
Aug 21, 2019 in Selenium
Aug 22, 2019 in Selenium
...