Tag Archives: how to find xpath?

WebApplication Qualys Security Scanning: How to Find XPath query in HTML DOM?

When you do web application security scan, we need to do authentication of application to extend the coverage. In most of the scanning tools (i.e qualys) has chrome extension to write selenium script which could do authentication in the application.

Any login selenium script finds appropriate HTML DOM elements (login or password) and do as per script commands. In authentication security scan, One has to know how to find login form DOM fields via Selenium XPATH Query. Let’s understand basic of XPATH in selenium script.

The basic format of XPath in selenium is explained below with screen shot.

Basic Format of XPath

Syntax for XPath selenium:

XPath contains the path of the element situated at the web page. Standard XPath syntax for creating XPath is.


Some more basic xpath expressions:

Xpath=	//label[@id='message23']
Xpath=	//input[@value='RESET']
Xpath= //img[@src='//cdn.guru99.com/images/home/java.png']