what you need is latest Mozzila Firefox and Selenium IDE extension.
you can easily install this tool. on this blog you can also find how to install Selenium IDE article.
Selenium IDE provides easy way to insert commands. you can add command manually or you can just record it from your web page. It helps the Tester to enter commands more quickly or restricts entering invalid commands.
How to access selenium IDE?
once you've installed Selenium IDE on Mozzila Firefox, you can open it with Ctrl+Alt+S.
Using Firebug
Mozzila Firebug tool also can be used to ease locating HTML Elements. you can add Firebug easily from Mozzila Extensions or you can find on this blog how to install Firebug.
Selenium IDE Features
File Menu contains features to create, edit, save, open test cases. on this menu you can also export test case as specific file format such as Java, PHP, C#, Ruby, Python that can run on Selenium RC and Web Driver.
You can insert new commands or comment on Edit menu, or you can just type it on command's box
Lets we start using selenium IDE, we will learn by doing now.
1. On BaseURL bar contain web page URL. you can type https://www.google.com/. we use this address for now.
2. Insert new commands by type it directly. Just type 'Open', it will open your base url.
3. Now run your simple test case with play current test case toolbar
4. That test will lead you to google.com
Now lets we try to put in some search keyword. On this step you will use Firebug
5. Right click on google search box->Inspect Element with Firebug
6. Elements information should be shown on bottom of browser
7. Take a look at bottom of the browser. find 'id' for selected elementwe know that search box has id 'lst-ib'
8. Add 'type' command below 'open' command you've created before. Fill target field with search box id 'lst-ib' and value with 'yourinformatics.blogspot.com'
command = Type
target = lst-ib
value = yourinformatics.blogspot.com
that command will type yourinformatics.blogspot.com automatically on search box
your test case should be like this now
google should automatically search your keyword without click search button. if not, you can add one more command using google search button id.
open a new tab. open your selenium IDE. click
your browser will automatically open google.com and type yourinformatics.blogspot.com
That's IT!
Thank you
ReplyDelete