Selenium IDE glob Example for Pattern Matching

In Unix environments, ‘glob’ is referred to pattern matching using wildcard characters. As it is simpler form of regular expression, it is used for basic pattern matching which does not involve much complexity. The power of ‘glob’ can be leveraged in Selenium IDE as well. It can be used with commands such as verifyText, verifyTitle when we are not sure about the exact text. Below is one such example of Selenium IDE glob pattern matching.

Check below image to see how glob: text is prefixed with the pattern to match.

Selenium IDE glob Script

Selenium IDE glob Script

In the image above, ? is translated to a specific single character. Whereas * is translated to any character in the text. Fore a list of more such wildcard characters, checkout official Selenium documentation.

As you can see, using glob for pattern matching in Selenium IDE makes maintenance of your test scripts very easy. Also, it is fairly easy way to implement pattern matching. Let us know your views on this.

Cheers!

Comments
  1. Gaurav Khurana

Leave a Reply

Your email address will not be published.