Print

Selenium IDE Useful Xpath Patterns

When using Xpath in Selenium IDE or Selenium WebDriver to identify web elements, here are some useful patterns to locate dynamic values for element’s id attributes. 

  • text

//div[text()='selenium master']

  • starts-with

 

Print

Using Xpath Checker in Selenium Test Automation

When using Xpath, confirming the Xpath script is very important to make sure that Selenium IDE, WebDriver or Selenium RC can identify the xpath locator during the test.

 

QA Engineers can use Xpath Checker to confim xpath. Xpath Checker needs to be installed on Firefox because it is an add on.

For example, on Wikipedia page, there is a link named "English". When using xpath, we can use the script below.

xpath=//div/a[text()="English"]

Print

Selenium IDE Xpath Tutorials

Selenium Xpath Tutorials

Identifying xpath for element with examples to use in selenium

QA Engineers need to provide any element locator(like id, name, css path, xpath etc.) in target column of selenium window to locate that specific element to perform some action on it .If you have worked with selenium IDE then you knows that sometimes elements does not contains id or name. Locating element by xpath is the another way of locating element and you can use it as a alternative of id or name of element.

Print

Selenium IDE User Extensions

User extensions are JavaScript files that allow one to create his or her own customizations and features to add additional functionality. Often this is in the form of customized commands although this extensibility is not limited to additional commands.

To add user extensions, open the "Options" menu and select options. On the Selenium IDE Options window, add Selenium IDE extensions.

Print

Using Globbing Pattern and Regular Expression with Selenium IDE

In some test cases, QA Engineers need to verify text or number patterns by using verifyTextPresent, verifyTitle, verifyAlert, assertConfirmation, verifyText, and verifyPrompt. Selenium locators can utilize pattern to describe special characters, and dynamic texts to verify what text is expected rather than having to specify that text exactly.

 

There are three types of patterns: globbing, regular expressions, and exact.

Print

Selenium IDE Script Debugging

Selenium IDE supports the setting of breakpoints and the functionality to start and stop the running of a test case.

Users can run up to a specific command in the middle of the test case and inspect how the test case behaves at that point.

To do this, the user needs to set a breakpoint on the command just before the one to be examined.

Print

Export Selenium IDE Script to other Languages

When recording test case with Selenium IDE, the default script will be html script. The script can be exported to other programming languages, so that QA engineers can use Java, C#, Ruby, or Python to develop Selenium test framework.

 

To change the script format, open "Options" menu, select "Format" command, and then choose one of these programming languages from the menu.

Print

Selenium IDE Alerts, Popups and Multiple Windows

Selenium IDE can handle Alerts, Popups and Multiple Windows by using some commands below.  User should respond to alert/confirm boxes, as well as moving focus to newly opened popup windows.

 

  • assertAlert
  • assertConfirmation