• USA : +1 973 910 5725
  • INDIA: +91 905 291 3388
  • info@tekslate.com
  • Login

Debugging & Exception/Error handling in Selenium

Debug:-

It is a process of running the scripts in step by step mode to identify the errors in runtime and we can also see the execution flow of the script.

2describe the scripts to run any class in debug mode

2Add the break point at the specific line by double clicking on the line number.

2From the breakpoint onwards the script will be executed line by line

2Right click on the script

2click on debugsàselect java application

2Click yes in “confirm perspective switch” window to run the script in debug mode

2Click on F1 to run the scripts in line by line

2Click on F5 to navigate into the method

2Click on F8 to run the script with out debug mode

2TOI comeback to the normal window click on redbutton[terminal] in debug section then click on java.

2Double click on the break point to remove.

These core tutorials will help you to learn the Debugging & Exception/Error handling in Selenium. 
For an in-depth understanding and practical experience,  explore Selenium Training Videos.

Exception/Error handling:-

2Exception means error .while running the scripts ,if any error identified the script execution will be block or break .

2To continue the execution while in exception we need to we try catch block

2It is for both known and unknown exceptions

Public void  hindi() {

Try{

Selenium.click(“link=hindi123”);

English();

}

Catch(exception e) {   e.print stocktrace();}

}

Public void bengali(){

Try{

Selenium.click(“link=Bengali”);

Englidsh();

} catch(exception e){ }

}

Check out the top Selenium Interview Questions now!

Location:-

2In selenium RC we are having the below locators

1)ID

2)NAME

3)CSS

4)X path

5)DOM ->document object model :- it is only for selenium rc not web load

2If ID ,Name, CSS, are not available (or) not working then  we can go for x path (or)DOM

For an Indepth knowledge on Selenium, click on below

Summary
Review Date
Reviewed Item
Debugging & Exception/Error handling in Selenium
Author Rating
4

“At TekSlate, we are trying to create high quality tutorials and articles, if you think any information is incorrect or want to add anything to the article, please feel free to get in touch with us at info@tekslate.com, we will update the article in 24 hours.”

0 Responses on Debugging & Exception/Error handling in Selenium"

    Leave a Message

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

    Site Disclaimer, Copyright © 2016 - All Rights Reserved.

    Support


    Please leave a message and we'll get back to you soon.

    I agree to be contacted via e-mail.