Why Selenium Script in QUALYS Web Application Scan?
The selenium script is an alternative way to authenticate the desired web application URL. In a scenario where your typical web application fails authentication due to continuous bombardment of WAS then one can use Selenium script as it gives a provision to wait for the stipulated timeframe or until the previous authentication session has logged out. This in-turn saves the failure of WAS Scan due to the authentication issue.
Sample Selenium Script:
<?xml version=”1.0″ encoding=”UTF-8″?>
<html xmlns=”http://www.w3.org/1999/xhtml” xml:lang=”en” lang=”en”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″ />
<link rel=”selenium.base” href=”http://testdemo15.com/” />
<title>Qualys Selenium_TestDemo15_Admin_v15</title>
</head>
<body>
<table cellpadding=”1″ cellspacing=”1″ border=”1″>
<thead>
<tr><td rowspan=”1″ colspan=”3″>Sample Test Case</td></tr>
</thead>
<tbody>
<tr><td>open</td><td>http://testdemo15.com/login/LoginForm.jsp</td><td></td>
</tr>
<tr><td>click</td><td>id=j_username</td><td></td>
</tr>
<tr><td>type</td><td>id=j_username</td><td>TestDemo15Username</td>
</tr>
<tr><td>click</td><td>id=j_password</td><td></td>
</tr>
<tr><td>type</td><td>id=j_password</td><td>TestDemo15Password</td>
</tr>
<tr><td>click</td><td>css=input.formButton</td><td></td>
</tr>
<tr><td>pause</td><td>60000</td><td></td>
</tr>
<tr><td>waitForElementPresent</td><td>css=div:contains(“Log Out”)</td><td></td>
</tr>
</tbody></table>
</body>
</html>
Explanation of fields used in above Selenium Script:
- URL under WAS is http://testdemo15.com/ – Enter in the field “selenium.base”
- Login page for the URL under WAS is http://testdemo15.com/login/LoginForm.jsp – Enter in the field “open”
- Username for the WAS URL is TestDemo15Username – Enter in the “type” with name “id=j_username”
- Password for the WAS URL is TestDemo15Password – Enter in the “type” with name “id=j_password”
- Wait period when authentication of the desired WAS URL is busy is 60000 (in milliseconds) – Enter in the field “pause”
- An additional wait period until the previous authentication session has logged out can be used – css=div:contains(“Log Out”) – Enter in the field “waitForElementPresent”

Excellent
LikeLike
A well deserved candidate
LikeLike
Nicely explained..👍
LikeLike
Well explained.
LikeLike
Helped me understand the concept and its implementation
LikeLike
Very easy to understand.
LikeLike
Nice. Keep up the good work
LikeLiked by 1 person
Excellent
LikeLike
Helpful information as always!!
LikeLike
Beneficial.
LikeLike
Nicely explained…
LikeLiked by 1 person
Best
LikeLike
Helped me understand the concept and it’s implementation.
LikeLike
Just what I needed – keep these posts coming!
LikeLiked by 1 person
Promising content
LikeLike
Excellent job done
LikeLike
Concept cleared! Excellent work done!
LikeLike
Well done! keep such posts coming.
LikeLike
Created Selenium script using this post. Thank you and keep posting such solutions.
LikeLike
Scripting made my life easy for WAS…
LikeLike
Great stuff!
LikeLike
Very helpful
LikeLike
Beneficial content
LikeLike
Great
LikeLike
Resolved one of my project issue for scripting.
LikeLike
scripting is always good to have!
LikeLike
My WAS authentication issue got resolved!
LikeLike
Good way to learn Qualys
LikeLike
Nicely explained
LikeLike
Well explained with sample scripts. Helped me a lot.
LikeLike
Nice one
LikeLike
Thanks, much needed !
LikeLike