I’ll write a very simple test case to execute by Selenium.
Title of test case: Verify that login successful when using valid account .
Step 1: For Firefox, go to link: https://login.yahoo.com/config/login_verify2?&.src=ym
Step 2: Input valid user name into Yahoo!ID field
Step 3: Input valid password into password field
Step 4: click on
Expected the result: Login should successful.
The following is step by step to use Selenium IDE.
1.Open Selenium IDE by click on Tools of browser and select Selenium IDE
2.Click on
3.Open link: https://login.yahoo.com/config/login_verify2?&.src=ym
4.Input valid username into Yahoo!ID field (this username is already existed) such as test_selenium0310
5.Input valid password into password field such as 123456
6.Click on
7.In order test the result, we have to verify that a unique name which exists on logged in page. I select “Hello- Test-selenium03 “to verify that Login successful.
You right click on Hello- Test-selenium03 word and select “verifyTextPresent Hello Test-selenium03”.
8.Now, you click on
9.After completing recording the result is like the below the screen.
Could you run it successful?
NO, you cannot.If you execute it, error occurs to say Hello Selenium is not present. Because the test tool runs faster than the page loads, so we have to wait until the page is loaded completely.
Error Like this:
You can solve this problem easily.
Steps:
1. Click on the fourth row. Like this:
2.You click on dropdown of comment and select clickAndWait
3.At the Value field, you enter 30000
OK. We have just finished writing test case using Selenium.
==>You can run by click on play button.
Wait: do you see code in Source code?. Yes, of course. You can create a “.html” file to create test case for Selenium IDE for you.
Have a nice day!!
Hi, My name is Micheal.I have many experience years about software testing. I would like to share my experiences with all you. I hope you have enjoy my blog.
Example about how to run Selenium IDE.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
Bạn để một lời bình luận nhé .^^.