Selenium IDE | Test Suits & Commonly Used Selenium Commands

Test Suits & Commonly Used Selenium Commands

Selenium IDE | Test Suits & Commonly Used Selenium Commands

When using Selenium IDE, test suites also can be defined using a simple HTML file. The syntax again is simple. An HTML table defines a list of tests where each row defines the filesystem path to each test. An example tells it all.

Test Suites: Test suites is a collection of tests. Often one will run all the tests in a test suite as one continuous batch-job. Let’s look at an example:

A file similar to this would allow running the tests all at once, one after another.

Test suites can also be maintained when using Selenium-RC. This is done via programming and can be done in a number of ways. Commonly Junit is used to maintain a test suite if one is using Selenium-RC with Java. Additionally, if C# is the chosen language, Nunit could be employed. If using an interpreted language like Python with Selenium-RC then some simple programming would be involved in setting up a test suite. Since the whole reason for using Selenium-RC is to make use of programming logic for testing this usually isn’t a problem

Commonly Used Selenium Commands

To conclude our introduction, we’ll show you a few typical Selenium commands. These are probably the most commonly used commands for building tests.

  • open – opens a page using a URL.
  • click/clickAndWait – performs a click operation, and optionally waits for a new page to load.
  • verify title/assertTitle – verifies an expected page title.
  • verifyTextPresent – verifies expected text is somewhere on the page.
  • verifyElementPresent – verifies an expected UI element, 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.
  • verifiable – verifies a table’s expected contents.
  • waitForPageToLoad – pauses execution until an expected new page loads. Called automatically when clickAndWait is used.
  • waitForElementPresent – pauses execution until an expected UI element, as defined by its HTML tag, is present on the page.

 

Selenium professional free practice test

Go back to Tutorial                                                                                Go to Home Page

Selenium IDE | Selenium Commands – Selenese
Selenium IDE | Locating Elements

Get industry recognized certification – Contact us

keyboard_arrow_up
Open chat
Need help?
Hello 👋
Can we help you?