when i started to learn about the test automation tools i kinda attached to pure coding with java web driver. That was so interesting and logical to learn. But as a starter i have to learn how Selenium IDE works too. So here i'm explaining some basic functionalists that we can do with IDE to play around with the tool
Basically IDE is used to automate the manual testing functionality in web based applications. This is mostly suitable for long term and rapidly changing type of a projects. IDE supports many types of languages, such as XML, HTML, JAVA, C# and many more.
it already has pre-configured parameters as commands where users can simply call them or users are free to define there own command as well. If a user wants to add any command then he/she can write the function in any language like java and that can be added from "Core extensions" section in the tool
Below is the tool that you get
as given in the diagram when we want to record a rest case or an activity that we do on the browser we can simply click on the record button, so that all the activities will be recorded in the IDE step by step. Later this can be extracted as a text, XML or HTML file.
Once the recording is done a test suite will be generated, If the user wants he/ she can again change the order or the command of the test case.
Here are some example scenarios
01.Calling a URL and input some value
Calling the "www.google.lk" and search something. You can open your IDE and type the same commands and see :)
| Loggin Scenario | ||
| open | http://www.google.lk | |
| type | Xpath=.//*[@id='gs_htif0'] | |
| type | id=gbqfq | This is a test scenario |
| clickAndWait | Xpath=.//*[@id='gbqfb'] | |
02. Mouse over actions
This example is to handle mouse over menus and selects a sub menu
| MouseOver | ||
| open | http://ibuy-shop.com/ | |
| mouseOver | Xpath=.//*[@id='header']/div[2]/ul/li[1]/a | |
| mouseOver | Xpath=.//*[@id='header']/div[2]/ul/li[1]/ul/li[2]/a | |
| clickAndWait | Xpath=.//*[@id='header']/div[2]/ul/li[1]/ul/li[2]/ul/li[1]/a | |
03. Select a data from date picker and a value from drop down
when we want to select a value from a drop down menu or from a date picker java calender script we can use the same method of sending the value as a text to the xpath
| DateAndDropDownValuePicker | ||
| open | http://www.gic.gov.lk/ | |
| clickAndWait | Xpath=.//*[@id='btn_menu']/ul/li[3]/a/img | |
| clickAndWait | Xpath=.//*[@id='ja-col']/div[3]/table/tbody/tr[5]/td[3]/a/span | |
| type | Xpath=.//*[@id='startStation'] | |
| type | name=startStation | ABL |
| type | Xpath=.//*[@id='endStation'] | |
| type | name=endStation | FOT |
| type | Xpath=.//*[@id='datepicker'] | |
| type | name=datepicker | 2013-10-23 |
| clickAndWait | Xpath=.//div[2]/table/tbody/tr[9]/td[2]/input | |

No comments:
Post a Comment