Page locators - mahmoudazaid/Web.Automation.SpecFlow GitHub Wiki

In selenium you can locate the elements by many locators:

1. Link Locator

Right-Click on the element > Inspect Element

<li><a href="/abtest">A/B Testing</a></li>

2. ID Locator

id="file-upload"

<form method="POST" enctype="multipart/form-data">
<input id="file-upload" type="file" name="file">
<br>
<input class="button" id="file-submit" type="submit" value="Upload">
</form>

3. Name Locator

In the Pervious HTML name="file"

3. XPath Locator

We will talk in detail about XPath in the next lesson

⚠️ **GitHub.com Fallback** ⚠️