Exceptions-Selenium Exceptions,Java Exceptions,Exception Handling

Hands-on with different exceptions in Selenium and Java. Please go through the different scenario’s of Exceptions with Programs,Exceptions and Solution.

Refer to the below Links for Practise
Selenium Wiki
Complete List of Selenium Basics
50 Real Time Interview Questions
Real Time Scenario’s
Java Platform Standard Edition 8 Documentation
Complete List of Java Basics
Java Quiz
Java OOPS Quiz
Selenium Advanced Quiz
Selenium Quiz
Selenium WebDriver Resume

Run-Time Exception: org.openqa.selenium.InvalidSelectorException

Console Output:

Solution:


Run-Time Exception: org.openqa.selenium.StaleElementReferenceException Indicates that a reference to an element is now “stale” — the element no longer appears on the DOM of the page.



Console Output:

Solution:


Run-Time Exception: org.openqa.selenium.NoSuchElementException

Console Output:

Solution:


Run-Time Exception:org.openqa.selenium.ElementNotInteractableException

Console Output:

Solution:


Run-Time Exception:org.openqa.selenium.SessionNotCreatedException

Console Output:

Solution:


Run-Time Exception:org.openqa.selenium.NoSuchSessionException
Session ID is null. Using WebDriver after calling quit()

Console Output:

Solution:


Run-Time Exception:org.openqa.selenium.TimeoutException
Thrown when a command does not complete in enough time.

Console Output:

Solution:


Run-Time Exception: org.openqa.selenium.NoSuchWindowException


Run-Time Exception: org.openqa.selenium.NoSuchFrameException

1 comment on “Exceptions-Selenium Exceptions,Java Exceptions,Exception Handling

  1. Pingback: Rerunning failed tests using IRetryAnalyzer,ITestResult in TESTNG - Total-QA

Leave a Reply

Your email address will not be published. Required fields are marked *