2012-11-28

Basic Functions in Selenium IDE

In this following article, we are going to learn some basic commands for working with web elements.From my previous posts, we know how to have setup and have a basic recording technique in selenium IDE.
In here we will discuss about popular functions of Selenium IDE and Selenium Web driver.
Popular functions are :
open : It is used for opening a URL.
Click : It performs a click operation
clickAndWait : It performs a click operation and waits to load
verifyTitle : verifies an expected page title. We use it for checking that the browser is displaying the expected page
assertTitle : It will check the title by compare.
Note: We may be confusion, why assert is differ from verify. Mainly verify used for running the test cases though they might fail, but assert used mainly for stopping the test case on failed condition.(we will see in the example)
verifyTextPresent : verifies expected text is somewhere on the full page.
verifyElementPresent : verifies an expected UI element(elements are described below), as defined by its HTML tag, is present on the page.
verifyText : verifies expected text and its corresponding HTML tag are present on the page.
verifyTable : verifies a table’s expected contents(with html).
waitForPageToLoad (clickAndWait) :This is not actually using for test purpose. Mostly it is used to keep wait for execution (wait for new page loading).
waitForElementPresent : wait for execution until an expected UI element, (HTML tag), is present on the page.

When we start selenium IDE in Firefox, we get those while right clicking mouse or, In the command selection combo in Selenium IDE.

2 comments:

  1. I am using all these functions of selenium IDE from last 2 months for my project. I found one other site (http://software-testing-tutorials-automation.blogspot.in) where he says selenium IDE supports gotoif, while, gotoLabel, label, push, etc.. commands. I tried it in selenium IDE but not works for me. I asked them but no answer. Can you please suggest me.. I am really in need of all those functions if they supports.

    ReplyDelete
    Replies
    1. Selenium IDE do not do those straight forward. You need to have plugins to do those. There are lot's of plugins present for Selenium IDE. Try to search firefox add on section and use them..

      Delete