tag:blogger.com,1999:blog-7158294769950848112024-03-19T01:48:46.256-07:00Selenium Automation TestingThis blog is a humble effort from my side to brief on my experience that I have in automation testing with Selenium so that it can be usefull for many other emerging automation testers.NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-715829476995084811.post-39970913617448504252015-12-16T04:13:00.000-08:002015-12-18T00:23:02.242-08:00Screenshots For Selenium Reports In Jenkins and Remote Systems<div dir="ltr" style="text-align: left;" trbidi="on">
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shCore.css" rel="stylesheet" type="text/css"></link>
<link href="http://alexgorbatchev.com/pub/sh/current/styles/shThemeDefault.css" rel="stylesheet" type="text/css"></link>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shCore.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCSharp.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCss.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJava.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushJScript.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPhp.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPython.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushRuby.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushSql.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushVb.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushXml.js" type="text/javascript"></script>
<script src="http://alexgorbatchev.com/pub/sh/current/scripts/shBrushPerl.js" type="text/javascript"></script>
<script language="javascript">
SyntaxHighlighter.config.bloggerMode = true;
SyntaxHighlighter.config.clipboardSwf = 'http://alexgorbatchev.com/pub/sh/current/scripts/clipboard.swf';
SyntaxHighlighter.all();
</script>
<br />
<div dir="ltr" style="text-align: left;" trbidi="on">
Its well known that we can capture screen during test execution of selenium. It can be done during any moment of script execution or can be configured for failure screens using test frameworks like TestNG. These screen captures can also be made available in our automation reports. In case of TestNG, we can use the 'Reporter.log' function to add the screen to the TestNG report. <br />
<code><span class="typ">
</span></code>
</div>
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;">1
2
3</pre>
</td><td><pre style="line-height: 125%; margin: 0;">String screenshotName <span style="color: #333333;">=</span> getClass<span style="color: #333333;">().</span><span style="color: #0000cc;">getSimpleName</span><span style="color: #333333;">()</span> <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">"_"</span> <span style="color: #333333;">+</span> testResult<span style="color: #333333;">.</span><span style="color: #0000cc;">getName</span><span style="color: #333333;">()</span> <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">"_"</span> <span style="color: #333333;">+</span> getCurrentDateTimeStamp<span style="color: #333333;">()</span> <span style="color: #333333;">+</span> <span style="background-color: #fff0f0;">".png"</span><span style="color: #333333;">;</span>
File scrFile <span style="color: #333333;">=</span> <span style="color: #333333;">((</span>TakesScreenshot<span style="color: #333333;">)</span>driver<span style="color: #333333;">()).</span><span style="color: #0000cc;">getScreenshotAs</span><span style="color: #333333;">(</span>OutputType<span style="color: #333333;">.</span><span style="color: #0000cc;">FILE</span><span style="color: #333333;">);</span>
FileUtils<span style="color: #333333;">.</span><span style="color: #0000cc;">copyFile</span><span style="color: #333333;">(</span>scrFile<span style="color: #333333;">,</span> <span style="color: #008800; font-weight: bold;">new</span> File<span style="color: #333333;">(</span><span style="background-color: #fff0f0;">"./build/reports/tests/screenshots/"</span><span style="color: #333333;">+</span>screenshotName<span style="color: #333333;">)); </span></pre>
</td></tr>
</tbody></table>
</div>
<br />
Here we can see that the screen capture gets stored at a folder called 'screenshots' which in turn is located from the root folder './<span style="background-color: #fff0f0;">build/reports/tests/'</span><br />
<br />
<span style="background-color: #fff0f0;"><span style="background-color: white;">The above code will work fine as long as your scripts are running from your local machines. Now comes the tricky part. What is we need to run these automated scripts from a remote machine or in CI tools like Jenkins? We cannot always assure the folder structure in the remote systems. It may happen that Jenkins or the Selenium Grid may insert a specific folder and thus while execution the report path may get different. So the screenshot file will not get rendered in our TestNG report.</span></span><br />
<br />
<span style="background-color: #fff0f0;"><span style="background-color: white;">A simple but effective solution to tackle such a scenario is to save your screenshots in <b>BASE64 </b>format instead of png files (by default selenium saves screen captured as '*.png' file). </span></span><span style="background-color: #fff0f0;"><span style="background-color: white;"><span class="_Tgc"><b>Base64</b> is a group of similar binary-to-text
encoding schemes that represent binary data in an ASCII string format by
translating it into a radix-64 representation. So you get to save your screen as a 'Text/String' format instead of a file. Now you can call this string in your report to get the very same image displayed in your report. Since it doesn't need to be stored in any folders unlike images, we can be rest assured that the report where ever is being populated will have the screenshots included and viewed.</span></span></span><br />
<br />
<span style="background-color: #fff0f0;"><span style="background-color: white;"><span class="_Tgc">This can be done as follows:</span></span></span><br />
<span style="background-color: #fff0f0;"><span style="background-color: white;"><span class="_Tgc"> </span> </span></span><br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;">1
2
3</pre>
</td><td><pre style="line-height: 125%; margin: 0;">String screenshotBase64 <span style="color: #333333;">=</span> <span style="color: #333333;">((</span>TakesScreenshot<span style="color: #333333;">)</span>driver<span style="color: #333333;">()).</span><span style="color: #0000cc;">getScreenshotAs</span><span style="color: #333333;">(</span>OutputType<span style="color: #333333;">.</span><span style="color: #0000cc;">BASE64</span><span style="color: #333333;">);</span>
screenShotList<span style="color: #333333;">.</span><span style="color: #0000cc;">add</span><span style="color: #333333;">(</span>screenshotBase64<span style="color: #333333;">);</span>
setMapList<span style="color: #333333;">(</span><span style="background-color: #fff0f0;">"SCREEN_NAME"</span><span style="color: #333333;">,</span> screenShotList<span style="color: #333333;">);</span>
</pre>
</td></tr>
</tbody></table>
</div>
<br />
Note the usage of 'OutputType.BASE64' in the above code snippet. This save the screen capture as a string to the variable 'screenshotBase64'. Now this can be added to a Java list and can be called during report generation.<br />
<br />
<!-- HTML generated using hilite.me --><br />
<div style="background: #ffffff; border-width: .1em .1em .1em .8em; border: solid gray; overflow: auto; padding: .2em .6em; width: auto;">
<table><tbody>
<tr><td><pre style="line-height: 125%; margin: 0;">1</pre>
</td><td><pre style="line-height: 125%; margin: 0;">test<span style="color: #333333;">.</span><span style="color: #0000cc;">log</span><span style="color: #333333;">(</span>LogStatus<span style="color: #333333;">.</span><span style="color: #0000cc;">INFO</span><span style="color: #333333;">,</span> <span style="background-color: #fff0f0;">"Snapshot below: "</span> <span style="color: #333333;">+</span> test<span style="color: #333333;">.</span><span style="color: #0000cc;">addScreenCapture</span><span style="color: #333333;">(</span><span style="background-color: #fff0f0;">"data:image/jpeg;base64, "</span><span style="color: #333333;">+</span>getMapList<span style="color: #333333;">(</span><span style="background-color: #fff0f0;">"SCREEN_NAME"</span><span style="color: #333333;">).</span><span style="color: #0000cc;">get</span><span style="color: #333333;">(</span>count<span style="color: #333333;">)));</span>
</pre>
</td></tr>
</tbody></table>
</div>
<br />
The above java code gets the screen captured as string from the List and adds the same to the report. Note that there is no need to mention the path of the screen as it is stored as a base64 type string. This helps to display the screen captures as is in automation reports.<br />
<br />
Hope that was helpful. Stay tuned for more. </div>
NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com5tag:blogger.com,1999:blog-715829476995084811.post-30039863317285384902014-06-05T08:51:00.002-07:002014-06-05T09:00:43.649-07:00TestNG Soft Assertions<div dir="ltr" style="text-align: left;" trbidi="on">
Instead of writing a custom logic, the TestNG library itself offers the facility to perform Soft Assertions in your test.<br />
<br />
To use testng soft assertion, you have to use testng SoftAssert class.
This class will helps to not throw an exception on assertion failure and
recording failure. If you will use soft assertion then your test
execution will remain continue even If any assertion fails. Another most
Important thing Is your assertion failure will be reported In report so
that you can view It at end of test. You can use soft assertion when
you are using multiple assertions In same test method and you wants to
execute all of them even If any one In between fails. <br />
<br />
<br />
<pre style="background: rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="word-wrap: normal;">SoftAssert s_assert = new SoftAssert();</code></pre>
<br /><pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"><code style="word-wrap: normal;"> </code><code style="word-wrap: normal;"> </code>
<code style="word-wrap: normal;">@Test
<b><span style="color: purple;">//In this method, Test execution will not abort even If any assertion fail. Full Test will be executed.</span></b>
public void soft_assert_text() {
Actualtext = driver.findElement(By.xpath("//h2/span")).getText();
<b><span style="color: purple;">//Text on expected side Is written Incorrect intentionally to get fail this assertion.</span></b>
s_assert.assertEquals(Actualtext, "Tuesday, 01 January 2014", "1st assert failed.");
System.out.println("Soft Assertion -> 1st pagetext assertion executed."); </code></pre>
</div>
NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com20tag:blogger.com,1999:blog-715829476995084811.post-33318419331179115982014-06-05T08:51:00.000-07:002014-06-05T08:51:50.179-07:00Custom wait for element function for web driver<div dir="ltr" style="text-align: left;" trbidi="on">
Web driver does have inbuilt functions to wait for the presence or even visibility of element on screen. However, at time we come across situations where non of the built in methods really work.<br />
<br />
So here below is a custom method that is designed to use with any type of selenium webdriver frameworks. Lets have a look at the method::<br />
<br />
<br />
public static void waitForEelement(final By locator, int timeOut) {<br /><br /> for (int second = 0;; second++) {<br /><br /> if (second >= timeOut) fail("timeout waiting for element");<br /><br /> try {<br /><br /> if ((getSelenium().getWrappedDriver().findElements(locator).size()) > 0){<br /><br /> break;<br /><br /> }<br /><br /> } catch (Exception e) {}<br /><br /> try {<br /><br /> Thread.sleep(1000);<br /><br /> } catch (InterruptedException e) {<br /><br /> e.printStackTrace();<br /><br /> }<br /><br /> }<br /><br /> <br /><br /> }<br />
<br />
<br />
This method can be called upon as follows:<br />
<br />
waitForEelement(By.xpath("//div[@class='signin']"),60);</div>
NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com7tag:blogger.com,1999:blog-715829476995084811.post-46564673253030189482014-05-27T04:38:00.000-07:002014-05-27T04:38:18.324-07:00Selenium xpath powerfull tips<div dir="ltr" style="text-align: left;" trbidi="on">
In this post, I will share with you a few useful xpath locator pointing techniques that can come handy in complex situations.<br />
<br />
1) When you have a button click that loads either 'Page A' or 'Page B' which you are not certain about.<br />
<br />
In the above situation, you need to identify a unique element from both pages first manually. Then use it with an OR (|) operator.<br />
<br />
<i>for eg: </i><br />
Page A contains: //input[@name='eventId']<br />
Page B contains: //span[@class='alert']<br />
<br />
Now you can use the OR operator to make selenium wait for the following xpath: <br />
<br />
<b>waitForElement(By.xpath("//input[@name='eventId']<span style="color: orange;"> | </span>//span[@class='alert']"); </b><br />
<br />
Notice the OR operator in yellow font.<br />
<br />
This is handy when you can make sure that one of the required page is loaded.<br />
<br />
<br />
2)Not many of us know that xpath is a powerful means to locate elemenst on the screen.<br />
<br />
<b>Descendant:</b> Finds desired html node that comes as any degree child of a parent node.<br />
<i>for eg:</i><br />
//div[contains(@class, 'aboveNav')]<span style="color: orange;">/descendant::img</span>[contains(@class, 'logo')]"]<br />
<br />
here by using 'descendant' you are actually asking selenium to find 'img' node that is under the 'div' node.<br />
<br />
<b>Parent:</b>Find the parent node of the previously invoked node.<br />
<i>for eg: </i><br />
//a[@name='GRND']<span style="color: orange;">/parent::div</span><br />
<br />
Here selenium can actually select the div that is the parent of node 'a'<br />
<br />
<b>Sibling:</b> Finds the sibling node of the previously invoked node.<br />
<i>for eg: </i><br />
//a[@name='GRND']/parent::div<span style="color: orange;">/following-sibling::div</span><br />
<br /><br /></div>
NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com4tag:blogger.com,1999:blog-715829476995084811.post-86579315143805594732012-12-30T23:27:00.001-08:002012-12-30T23:27:54.420-08:00Handling Authentication Required pop up using Selenium<div dir="ltr" style="text-align: left;" trbidi="on">
To handle the 'Authentication Required' pop up using selenium from Firefox web driver you can use the following web driver code:<br />
<br />
<br />
<div style="background-color: #cccccc;">
baseUrl = "https://<span style="color: orange;">NXTest</span>:<span style="color: #cc0000;">Test123</span>@apwms.qa.redbond.net/ui/"; <b> </b></div>
<span style="background-color: #cccccc;">driver.get(baseUrl); </span><br />
<b><br /></b>
<br />
where 'NXTest' will be your user name and 'Test123' the password.<b></b><br />
<b><br /></b>
<b><br /></b>
Hope this tip is of some help. <b> </b><br />
<b> </b></div>
NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com3tag:blogger.com,1999:blog-715829476995084811.post-71992590653878909252012-08-02T00:24:00.004-07:002012-08-02T00:54:38.893-07:00TestNg Groups feature in Selenium Automation<div dir="ltr" style="text-align: left;" trbidi="on">
In this blog, I would like to share with all of you on the usage of 'groups' feature of testNG in selenium automation.<br />
TestNG allows you to perform sophisticated groupings of test methods. Not
only can you declare that methods belong to groups, but you can also specify
groups that contain other groups. Then TestNG can be invoked and asked to
include a certain set of groups (or regular expressions) while excluding another
set. This gives you maximum flexibility in how you partition your tests
and doesn't require you to recompile anything if you want to run two different
sets of tests back to back.<br />
<br />
<u>Declaring a Group in your test:</u><br />
<br />
<code class="java keyword">public</code> <code class="java keyword">class</code> <code class="java plain">Test {</code><br />
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java color1">@Test</code><code class="java plain"></code><code class="java string"></code><code class="java plain"></code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java keyword">public</code> <code class="java keyword">void</code> <code class="java plain">testMethod1() {</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java plain">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java color1">@Test</code><code class="java plain"></code><code class="java string"></code><code class="java plain"><br /></code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java keyword">public</code> <code class="java keyword">void</code> <code class="java plain">testMethod2() {</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java plain">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java color1">@Test</code><code class="java plain"></code><code class="java string"></code><code class="java plain"></code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java keyword">public</code> <code class="java keyword">void</code> <code class="java plain">testMethod3() {</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java plain">}</code></td></tr>
</tbody></table>
</div>
<code class="java plain">}</code><br />
Here you can see there are three methods declared inside the class namely testMethod1, testMethod2, testMethod3. Consider them as three scenarios (@Test in TestNg).<br />
Now one may be only needed to run while a sanity testing is performed, the other only for a regression testing and another for both sanity and regression. In such a situvation Groups concept of testNg is very usefull.<br />
We can define classify these tests on the basis of thier type of testing with the help of groups as follows:<br />
<br />
<code class="java keyword">public</code> <code class="java keyword">class</code> <code class="java plain">Test {</code><br />
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java color1">@Test</code><code class="java plain">(<span style="color: red;">groups = { </span></code><code class="java string" style="color: red;">"sanity"</code><code class="java plain" style="color: red;"></code><code class="java string" style="color: red;"></code><span style="color: red;"> </span><code class="java plain"><span style="color: red;">}</span>)</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java keyword">public</code> <code class="java keyword">void</code> <code class="java plain">testMethod1() {</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java plain">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java color1">@Test</code><code class="java plain">(<span style="color: red;">groups = {</span></code><code class="java string" style="color: red;">"regression"</code><code class="java plain" style="color: red;"></code><code class="java string" style="color: red;"></code><code class="java plain"><span style="color: red;">}</span>)</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java keyword">public</code> <code class="java keyword">void</code> <code class="java plain">testMethod2() {</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java plain">}</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java color1">@Test</code><code class="java plain">(<span style="color: red;">groups = { </span></code><code class="java string" style="color: red;">"sanity", "regression"</code><span style="color: red;"> </span><code class="java plain"><span style="color: red;">}</span>)</code></td></tr>
</tbody></table>
</div>
<div class="line alt1">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java keyword">public</code> <code class="java keyword">void</code> <code class="java plain">testMethod3() {</code></td></tr>
</tbody></table>
</div>
<div class="line alt2">
<table><tbody>
<tr><td class="content"><code class="spaces"> </code><code class="java plain">}</code></td></tr>
</tbody></table>
</div>
<code class="java plain">}</code><br />
Notice the use of 'groups' inside the @Test annotation in the above example. So we have classified the three scenarios into diffrent groups.<br />
<br />
Now to execute this scenarios on the basis of their specific groups we have two options availabe.<br />
<br />
<div style="background-color: #bf9000;">
1) FROM THE SUITE XML [TESTNG XML]</div>
<span style="background-color: #bf9000;">2) FROM THE ANT XML [BUILD XML]</span><br />
<br />
I shall explain in detail on these two options in my upcoming blogs.....<br />
Please follow up with your comments in case of any suggestions or opinions.<br />
<br /></div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com0tag:blogger.com,1999:blog-715829476995084811.post-80516208449484115602012-04-12T00:00:00.001-07:002012-04-30T05:29:04.554-07:00Maximize browser window in Selenium Web Driver<div dir="ltr" style="text-align: left;" trbidi="on">
From Selenium 2.21, we can now maximize the browser window, similar to Selenium RC.<br />
<br />
<u> Direct way:</u><br />
<br />
<div>
<pre><div>
public static void main(String[] args) {</div>
<div>
WebDriver d = new FirefoxDriver();</div>
<div>
d.get("<a href="http://www.google.com/" target="_blank">http://www.google.com</a><wbr></wbr>");</div>
<div>
</div>
<b> <span style="color: #274e13;">d.manage().window().</span></b><b style="color: #274e13;">maximize();</b></pre>
<pre><b style="color: #274e13;"> </b><div>
System.out.println(d.<wbr></wbr>getTitle());</div>
<div>
d.quit();</div>
<div>
}</div>
</pre>
</div>
<br />
<u>Indirect way: </u><br />
<br />
we can also maximize the browser window usingt the toolkit utility which query the native operating system directly and is
platform independent. In addition to this, the code below will maximize
the browser window according to your system's current resolution.<br />
<br />
<div class="container" style="color: #20124d;">
<div class="line number1 index0 alt2">
<b><code class="jscript plain">driver.manage().window().setPosition(</code><code class="jscript keyword">new</code> <code class="jscript plain">Point(0,0));</code></b></div>
<div class="line number2 index1 alt1">
<b><code class="jscript plain">java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();</code></b></div>
<div class="line number3 index2 alt2">
<b><code class="jscript plain">Dimension dim = </code><code class="jscript keyword">new</code> <code class="jscript plain">Dimension((int) screenSize.getWidth(), (int) screenSize.getHeight());</code></b></div>
<div class="line number4 index3 alt1">
<b><code class="jscript plain">driver.manage().window().setSize(dim);</code></b></div>
<div class="line number4 index3 alt1">
</div>
<div class="line number4 index3 alt1">
<b><code class="jscript plain"><span style="color: black;">U</span></code></b><code class="jscript plain"><span style="color: black;">se the above script in your test setup method where you initiate the browser to get a fully maximized brwoser window that fits your monitor's screen size....</span></code></div>
<div class="line number4 index3 alt1">
</div>
<div class="line number4 index3 alt1">
<code class="jscript plain"><span style="color: black;"> </span></code><b><code class="jscript plain"><br /></code></b></div>
</div>
</div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com3tag:blogger.com,1999:blog-715829476995084811.post-66024646105168953382012-04-10T03:08:00.000-07:002012-04-11T23:46:45.948-07:00How to handle frame pop ups using Selenium Webdriver<div dir="ltr" style="text-align: left;" trbidi="on">
Frames are not exactly treated as pop ups or external windows in Selenium Web driver. There will be a frame id for each frame. We have to invoke this particular frame id to handle the actions related to frames when automationg using selenium 2.0<br />
<br />
See the example provided below:<br />
<br />
<span style="font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;">
<b style="color: #cc0000;">driver.switchTo().frame("</b><wbr style="color: #cc0000;"></wbr><b style="color: #cc0000;">companyFlyoutIFrame");</b><wbr style="color: #cc0000;"></wbr><b style="color: lime;"> </b> </span></span><br />
<br />
<div style="color: black;">
<span style="font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;">where "</span></span><span style="font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;">companyFlyoutIFrame" is the id of the frame. To obtain the id, inspect the frame object using the firebug.</span></span></div>
<br />
<span style="font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;">The above line is the script used to switch the control to the frame. once the control is switched, you can do the actions on the frame as normal selenium commands.</span></span><br />
<br />
<span style="font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;">Once you are done with the frame, it is also important to switch the control back to the main window. To do this you can use the following script:</span></span><br />
<br />
<b><span style="font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;">
<span style="color: red;">driver.switchTo().</span><wbr style="color: red;"></wbr><span style="color: red;">defaultContent();</span></span></span></b><span style="color: red; font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;"> </span></span><br />
<span style="color: red; font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;"><br /></span></span><br />
<span style="color: red; font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;"><span style="color: black;">willl switch the controll back to the main window by closing the frame.</span></span></span><br />
<br />
<span style="color: red; font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;"><span style="color: black;">Hope it is informative....</span></span></span><br />
<span style="color: red; font-family: Arial; font-size: x-small;"><span style="font-family: Arial; font-size: 10pt;"><span style="color: black;"> </span></span></span><br />
<div style="color: red;">
<br /></div>
</div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com2tag:blogger.com,1999:blog-715829476995084811.post-28264809230571532312012-04-04T22:47:00.000-07:002012-04-04T22:47:25.211-07:00Finding the Class name from Xpath of an Element in Selenium<div dir="ltr" style="text-align: left;" trbidi="on">Sometimes, we may require to find the Class name of an element whoes xpath we know.<br />
We can use the "getAttribute()" method of Selenium to handle this situvation.<br />
<br />
consider the example below:<br />
<br />
String Name=webDriver.findElement(By.xpath(//div[@class='hotelRoomCard'][5]/span[2]/button).getAttribute("class");<br />
System.out.println("The class name is:"+Name); <br />
<br />
The output will geive you the class name.<br />
This in turn can be used to identify the object with a desired class name.<br />
Hope it was helpfull.... :)<br />
<br />
</div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com0tag:blogger.com,1999:blog-715829476995084811.post-51592385893539462002012-03-20T06:14:00.000-07:002012-08-02T00:56:40.804-07:00Xpath Count in Selenium2 WebDriver<div dir="ltr" style="text-align: left;" trbidi="on">Selenium 1 uses 'getXpathCount' method to find the Xpath count of an atribute in the screen.<br />
But in Selenium2 webdriver it is done by the following way:<br />
<br />
<b>int xpathCount= webDriver.findElements(By.xpath("//div[@id='billingProfiles']/div[@class='cardContainer']")).size();</b><br />
<br />
please note that we are using 'findElements' instead of the usual 'findElement' method.</div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com2tag:blogger.com,1999:blog-715829476995084811.post-64415072285182173292012-03-19T04:06:00.000-07:002012-03-19T04:06:33.299-07:00TestNG Suite Set up and Tear Down<div dir="ltr" style="text-align: left;" trbidi="on">ackage selenium.src.com.ofb.supportClasses;<br />
<br />
import java.util.concurrent.TimeUnit;<br />
<br />
import org.openqa.selenium.WebDriver;<br />
import org.openqa.selenium.WebDriverBackedSelenium;<br />
import org.openqa.selenium.firefox.FirefoxDriver;<br />
import org.openqa.selenium.ie.InternetExplorerDriver;<br />
import org.openqa.selenium.support.events.EventFiringWebDriver;<br />
import org.openqa.selenium.support.events.WebDriverEventListener;<br />
import org.testng.annotations.AfterMethod;<br />
import org.testng.annotations.BeforeMethod;<br />
import org.testng.annotations.Optional;<br />
import org.testng.annotations.Parameters;<br />
<br />
public class OfbTestSet{<br />
<br />
private WebDriver webDriver;<br />
private String testUrl, loginID, password;<br />
<br />
@BeforeMethod(alwaysRun = true)<br />
@Parameters({"browser", "testUrl", "loginID", "password"}) <br />
public void setUp(@Optional ("") String browser, <br />
@Optional ("") String testUrl,<br />
@Optional ("") String loginID,<br />
@Optional ("") String password) throws Exception{<br />
<br />
if (browser.contentEquals(""))<br />
browser = ReadProperty.commonValueProps.getProperty("browser");<br />
if (testUrl.contentEquals(""))<br />
testUrl = ReadProperty.commonValueProps.getProperty("testUrl");<br />
if (loginID.contentEquals(""))<br />
loginID = ReadProperty.commonValueProps.getProperty("LoginID");<br />
if (password.contentEquals(""))<br />
password = ReadProperty.commonValueProps.getProperty("Password");<br />
<br />
this.testUrl = testUrl; this.loginID = loginID; this.password = password;<br />
<br />
if (browser.contentEquals("firefox"))<br />
{<br />
//FirefoxProfile ofbFF = new FirefoxProfile(new File("OfbFirefoxProfile/data"));<br />
//ofbFF.setAcceptUntrustedCertificates(false);<br />
//ofbFF.setAssumeUntrustedCertificateIssuer(false);<br />
//ofbFF.setPreference("network.dns.disableIPv6", true);<br />
//ofbFF.setEnableNativeEvents(false);<br />
<br />
WebDriverEventListener eventListener = new CustomEventListener();<br />
webDriver = new EventFiringWebDriver(new FirefoxDriver()).register(eventListener);<br />
}<br />
<br />
if (browser.contentEquals("iexplorer"))<br />
{<br />
WebDriverEventListener eventListener = new CustomEventListener();<br />
webDriver = new EventFiringWebDriver(new InternetExplorerDriver()).register(eventListener);<br />
}<br />
webDriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);<br />
<br />
webDriver.get(testUrl);<br />
<br />
//To maximize the browser window<br />
WebDriverBackedSelenium selenium = new WebDriverBackedSelenium(webDriver, "");<br />
selenium.windowMaximize();<br />
}<br />
<br />
@AfterMethod(alwaysRun = true)<br />
public void tearDown() throws Exception {<br />
webDriver.quit();<br />
}<br />
<br />
public WebDriver getWebDriver() {<br />
return webDriver;<br />
}<br />
<br />
public String getTestUrl(){<br />
return testUrl;<br />
}<br />
<br />
public String getLoginID(){<br />
return loginID;<br />
}<br />
<br />
public String getPassword(){<br />
return password;<br />
}<br />
<br />
}<br />
</div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com1tag:blogger.com,1999:blog-715829476995084811.post-72073663687137001622012-03-13T06:00:00.003-07:002012-03-13T06:04:10.053-07:00How to install ANT on LINUX<div dir="ltr" style="text-align: left;" trbidi="on"><h2>How to install ANT on LINUX</h2>Apache Ant is a Java library and command-line tool that help building software.<br />
How to install:<br />
<ul><li>Create downloads directory if you dont have one</li>
<li>Download tar version from <a href="http://ant.apache.org/bindownload.cgi">http://ant.apache.org/bindownload.cgi</a></li>
<li>Extract</li>
<li>Rename the new directory as <b>ant</b></li>
<li>Insert the path into ANT_HOME</li>
<li>Update the global PATH variable to include ANT_HOME</li>
<li>Run the Ant script fetch.xml to install almost all the dependencies the optional Ant tasks need.</li>
</ul>See actual commands:<br />
<br />
<pre class="bash" style="font-family: monospace;"><span style="color: #7a0874; font-weight: bold;"></span><span style="color: #c20cb9; font-weight: bold;">bash</span> ~<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> downloads
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> ~<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #7a0874; font-weight: bold;">cd</span> downloads<span style="color: black; font-weight: bold;">/</span>
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: black; font-weight: bold;">//</span>mirror.candidhosting.com<span style="color: black; font-weight: bold;">/</span>pub<span style="color: black; font-weight: bold;">/</span></pre><pre class="bash" style="font-family: monospace;"><span style="color: black; font-weight: bold;"> </span>apache<span style="color: black; font-weight: bold;">//</span>ant<span style="color: black; font-weight: bold;">/</span>binaries<span style="color: black; font-weight: bold;">/</span>apache-ant-1.8.2-bin.tar.gz
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #c20cb9; font-weight: bold;">tar</span> <span style="color: #660033;">-zxvf</span> apache-ant-1.8.2-bin.tar.gz
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #c20cb9; font-weight: bold;">mv</span> apache-ant-1.8.2 ant
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #007800;">ANT_HOME</span>=<span style="color: black; font-weight: bold;">/</span>home<span style="color: black; font-weight: bold;">/</span>nx<span style="color: black; font-weight: bold;">/</span>ls<span style="color: black; font-weight: bold;">/</span>downloads<span style="color: black; font-weight: bold;">/</span>ant
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$ <span style="color: #007800;">PATH</span>=<span style="color: #007800;">$PATH</span>:<span style="color: maroon;">${ANT_HOME}</span><span style="color: black; font-weight: bold;">/</span>bin
<span style="color: #7a0874; font-weight: bold;">[</span><span style="color: #c20cb9; font-weight: bold;">bash</span> downloads<span style="color: #7a0874; font-weight: bold;">]</span>$ ant <span style="color: #660033;">-f</span> fetch.xml <span style="color: #660033;">-Ddest</span>=system</pre></div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com0tag:blogger.com,1999:blog-715829476995084811.post-56894457999322427702012-03-13T05:45:00.001-07:002012-04-30T05:23:34.392-07:00TestNG XSLT Report Generation<div dir="ltr" style="text-align: left;" trbidi="on">
Reports are vital part of any automation testing and with Selenium+TestNG framework we have the default TestNG reports, which some consider to be a little out of date... to over come this, we have a add on report for TestNG know as TestNG-XSLT which gives good graphical representation of the generated report.<br />
<br />
<span style="font-family: Verdana,sans-serif;">TestNG-xslt generates user friendly reports using the TestNG results output (testng-results.xml). Its uses the pure XSL for report generation and Saxon as an XSL2.0 implementation.</span><br />
<span style="font-family: Verdana,sans-serif;"><br />
</span><br />
<span style="font-family: Verdana,sans-serif;">For generating testng-xslt report for your project do the following:<br />
1. Download the testng-xslt from</span><br />
<span style="font-family: Verdana,sans-serif;"> http://code.google.com/p/testng-xslt/<br />
2. Unzip and copy the testng-results.xsl from the testng-xslt folder(testng-xslt-1.1\src\main\resources) to your own project folder.<br />
3. Now copy the saxon library from (testng-xslt-1.1\lib\saxon-8.7.jar)to your project lib folder.<br />
4. Modify your build.xml of ant and add the following target to it.</span><br />
<br />
<pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"><code><project name="test" basedir=".">
<property name="LIB" value="${basedir}/libs" />
<property name="BIN" value="${basedir}/bin" />
<path id="master-classpath">
<pathelement location="${BIN}" />
<fileset dir="${LIB}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="testng-xslt-report">
<delete dir="${basedir}/testng-xslt">
</delete>
<mkdir dir="${basedir}/testng-xslt">
</mkdir>
<xslt in="${basedir}/test-output/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html">
<param expression="${basedir}/testng-xslt/" name="testNgXslt.outputDir" />
<param expression="true" name="testNgXslt.sortTestCaseLinks" />
<param expression="FAIL,SKIP,PASS,CONF,BY_CLASS" name="testNgXslt.testDetailsFilter" />
<param expression="true" name="testNgXslt.showRuntimeTotals" />
<classpath refid="master-classpath">
</classpath>
</xslt>
</target>
</project></code></pre>
<br />
<span class="Apple-style-span" style="font-family: Verdana,sans-serif;">You need to provide the testng-xslt stylesheet the TestNG results xml(testng-results.xml) , the path to the style sheet testng-results.xsl and the output index.html path.<br />
<br />
Also dont forget to add the saxon library to your target classpath else you will get an error. In my case it is the master-classpath.<br />
<br />
Now run the ant target for report generation (in this case "testng-xslt-report</span><span class="Apple-style-span" style="font-family: Verdana,sans-serif;">") and check the ouput folder configured by you for testng-xslt report.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-RnrRsI_c_bG05Z2jod10XcIR9tzXP03OkxOsrJjvReoz6JU5pSome016z7Ulxtmp4zmgvTiXws_QssCO-L0pH2BH2QUU-MPKqLo9ctkbyhG19l1GphHuEzoEoKvzatHg0E5j8JzCI0Y/s1600/results.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="216" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-RnrRsI_c_bG05Z2jod10XcIR9tzXP03OkxOsrJjvReoz6JU5pSome016z7Ulxtmp4zmgvTiXws_QssCO-L0pH2BH2QUU-MPKqLo9ctkbyhG19l1GphHuEzoEoKvzatHg0E5j8JzCI0Y/s320/results.png" width="320" /></a></div>
<br /></div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com34tag:blogger.com,1999:blog-715829476995084811.post-50517375835057034882012-03-13T05:33:00.000-07:002012-08-14T02:09:25.899-07:00Build XML for Selenium+TestNG+ANT framework<div dir="ltr" style="text-align: left;" trbidi="on">
I have developed a build.xml that can handle the the build of a test suite and do the reporting. It even send the report as mail. For reporting we are using TestNG-XSLT<br />
<br />
<project name="Automation" default="clean" basedir="."><br />
<property name="build.dir" value="${basedir}/build"/><br />
<property name="lib.dir" value="${basedir}/lib"/><br />
<property name="src.dir" value="${basedir}/src"/><br />
<property name="browser" value="/home/nxavier/Downloads/firefox/firefox"/><br />
<target name="setClassPath"><br />
<path id="classpath_jars"><br />
<pathelement path="${basedir}/" /><br />
<fileset dir="${lib.dir}" includes="*.jar" /><br />
</path><br />
<pathconvert pathsep=":" property="test.classpath" refid="classpath_jars" /><br />
</target><br />
<target name="loadTestNG" depends="setClassPath"><br />
<taskdef resource="testngtasks" classpath="${test.classpath}"/><br />
</target><br />
<target name="init"><br />
<mkdir dir="${build.dir}"/><br />
<tstamp><br />
<format property="timestamp" pattern="dd-MM-yyyy_(HH-mm-ss)"/><br />
</tstamp><br />
<property name="build.log.dir" location="${basedir}/buildlogs"/><br />
<mkdir dir="${build.log.dir}"/><br />
<property name="build.log.filename" value="build_${timestamp}.log"/><br />
<record name="${build.log.dir}/${build.log.filename}" loglevel="verbose" append="false"/><br />
<echo message="build logged to ${build.log.filename}"/><br />
</target><br />
<target name="clean"><br />
<echo message="deleting existing build directory"/><br />
<delete dir="${build.dir}"/><br />
</target><br />
<target name="compile" depends="clean,init,setClassPath,loadTestNG"><br />
<echo message="classpath:${test.classpath}"/><br />
<echo message="compiling.........."/><br />
<javac destdir="${build.dir}" srcdir="${src.dir}" classpath="${test.classpath}"/><br />
</target><br />
<target name="runTests" depends="compile"><br />
<testng classpath="${test.classpath}:${build.dir}"><br />
<xmlfileset dir="${basedir}" includes="Debug.xml"/><br />
</testng><br />
</target><br />
<target name="report" depends="runTests"><br />
<delete dir="${basedir}/testng-xslt"/><br />
<mkdir dir="${basedir}/testng-xslt"/><br />
<xslt in="${basedir}/test-output/testng-results.xml"<br />
style="${basedir}/src/xslt/testng-results.xsl" out="${basedir}/testng-xslt/index.html" processor="SaxonLiaison"><br />
<param expression="${basedir}/testng-xslt/" name="testNgXslt.outputDir"/><br />
<param expression="true" name="testNGXslt.sortTestCaseLinks"/><br />
<param expression="FAIL,SKIP,PASS,BY_CLASS" name="testNgXslt.testDetailsFilter"/><br />
<param expression="true" name="testNgXslt.showRuntimeTotals"/><br />
<classpath refid="classpath_jars"/><br />
</xslt><br />
</target><br />
<target name="RunAndViewReport" depends="report"> <br />
<exec executable="${browser}" spawn="yes"> <br />
<arg line="'${basedir}/testng-xslt/index.html'" /> <br />
</exec><br />
</target><br />
<target name="sendMail" depends="RunAndViewReport"><br />
<zip destfile="${basedir}/testng-xslt/Report.zip" basedir="${basedir}/testng-xslt"/><br />
<mail mailhost="smtp.gmail.com" mailport="465" subject="Notification of TESTNG build" ssl="false" user="tester@gmail.com" password="password"><br />
<from address="tester@gmail.com"/><br />
<to address="tester@gmail.com"/><br />
<message>The build has finished. A details report of this build is aatched</message><br />
<attachments><br />
<fileset dir="testng-xslt"><br />
<include name="**/*.zip"/><br />
</fileset><br />
</attachments><br />
</mail><br />
</target><br />
</project><br />
<br />
<br />
<br /></div>
NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com18tag:blogger.com,1999:blog-715829476995084811.post-30687040633862638712012-02-15T01:35:00.000-08:002012-02-15T01:35:40.520-08:00Selenium 2.0-The future of Selenium!!!<div dir="ltr" style="text-align: left;" trbidi="on">Selenium 2.0 is a major milestone in Selenium's automations landmark. Selenium 2.0 has many new exciting features and improvements over Selenium 1. The primary new feature is the integration of the WebDriver API. This addresses a number of limitations of Selenium 1 (RC) along with providing an alternative, and simpler, programming interface. The goal is to develop an object-oriented API that provides additional support for a larger number of browsers along with improved support for modern advanced web-app testing problems.<br />
<br />
Rather than being a JavaScript application running within the browser, it uses whichever mechanism is most appropriate to control the browser. For Firefox, this means that WebDriver is implemented as an extension. For IE, WebDriver makes use of IE's Automation controls. By changing the mechanism used to control the browser, we can circumvent the restrictions placed on the browser by the JavaScript security model. In those cases where automation through the browser isn't enough, WebDriver can make use of facilities offered by the Operating System. For example, on Windows we simulate typing at the OS level, which means we are more closely modeling how the user interacts with the browser, and that we can type into "file" input elements.<br />
<br />
So, what are the differences between Selenium WebDriver and Selenium RC and where innovation is?<br />
<strong>The thing is in the way of interaction with the browser:</strong><br />
<ul class="pretty-list"><li>Selenium RC sends commands to the browser using JavaScript Selenium Core.</li>
<li>WebDriver works with the browser through native browser interface.</li>
</ul><br />
<br />
Selenium developers recommend to use Selenium webDriver, as Selenium RC was officially deprecated. </div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com6tag:blogger.com,1999:blog-715829476995084811.post-17864718765782464202012-02-14T23:20:00.000-08:002012-02-14T23:21:16.469-08:00Selenium+TestNG+ANT (SAT) FrameWork<div dir="ltr" style="text-align: left;" trbidi="on">One of the descent framework for dynamic data driven testing using Selenium is by using Selenium along with TestNG and ANT as the build tool.<br />
The flexibilty in this framework is that it allows you to execute the test suite either from an IDE like eclipse or from a batch file with the help of ANT.<br />
This helps an external user who have little knwledge on Selenium to execute the test suite by double clicking on the batch file....<br />
I shall post here further details of this framework if any of you would like to know more in details about this framework.</div>NXhttp://www.blogger.com/profile/09119096857398274440noreply@blogger.com1