Page Source (Inspect Element)
Before reading this you might want to read:
Page Source(Inspect Element)
Often, when testing, you simply must look at the page source (the HTML for the webpage you’re trying to test) to determine a problem. There are a couple of ways to check the page source in Firefox and Chrome.
Chrome:
To view have a look at the path of a specific element, right-click on the element and select Inspect (Ctrl+Shift+I). This opens the source code pane with the element's code highlighted as shown below.
Using this you can either copy the XPath or write a custom XPath. To know how to write XPath, click here.
Press the function key F12 which opens a pane in the browser window showing the web page source code. Use its Search feature (Ctrl + F) to search for a keyword to find the HTML for the UI element.
Firefox:
To view have a look at the source of a specific element, right-click on the element and select Inspect (Ctrl+Shift+I). This opens the source code pane with the element's code highlighted as shown below.
In Firefox, press the function key F12 which opens a pane in the browser window showing the source code. Use its Search feature (Ctrl + F) to search for a keyword to find the HTML for the UI element you’re trying to test.
After this you might want to read: