To choose a part of a website, we use a language called: "XPath"

XPath is used as a map, it tells us which part of a website we should click or which text box we should type in


We can get the XPath for a part of a website via our web browser:


Firefox:


1. Right click on the website textbox/button/link

2. Click "Inspect"

3. A "code console" will then appear (usually at the bottom of web browser), and the HTML code representing the website piece we right clicked on will be highlighted

4. Right click this highlighted code

5. Click: "Copy", then click: "XPath"

6. Now you will successfully retrieved the XPath for this piece of the website


Safari:


1. Right click on the websites textbox/button/link

2. Click "Inspect Element"

3. A "code console" will then appear (usually at the bottom of web browser), and the HTML code representing the website piece we right clicked on will be highlighted

4. Right click this highlighted code

5. Click: "Copy", then click: "XPath"

6. Now you will successfully retrieved the XPath for this piece of the website


Chrome


1. Right click on the websites textbox/button/link

2. Click "Inspect Element"

3. A "code console" will then appear (usually at the bottom of web browser), and the HTML code representing the website piece we right clicked on will be highlighted

4. Right click this highlighted code

5. Click: "Copy", then click: "Copy full XPath"

6. Now you will successfully retrieved the XPath for this piece of the website




Step 1/2:



Step 3/4:



Step 5/6: