Explore Courses Blog Tutorials Interview Questions
0 votes
in DevOps and Agile by (19k points)

How do I write Dynamic XPath in a Selenium WebDriver?

1 Answer

0 votes
by (47.6k points)

In order to write dynamic XPath in a Selenium WebDriver. First of all, you should have a firefox browser with firebug and fire path installed the plugin.

First of all, after the installation, press F12 to view this plugin.

Now follow below-mentioned steps:-

  1. Select XPath after Click on fire path and.

  2. After that open any website and inspect web element - you will get XPath of that element in fire path.

  3. In XPath, you can view id, class, visible text. Inspect element location properly.

  4. Now create your own XPath based on the unique ID of web element.

If you want to learn Selenium you must enrol in the Intellipaat’s Selenium Training Course. You should also watch the following Selenium video tutorial.


Browse Categories