<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1479587947502358548</id><updated>2024-10-24T11:34:13.862+05:30</updated><category term="software testing"/><category term="performance testing"/><category term="selenium"/><category term="Internet"/><category term="junit"/><category term="Delhi IT Pro"/><category term="MISC NEWS"/><category term="MS News"/><category term="MS Office"/><category term="Microsoft Events"/><category term="Office 2010"/><category term="Yahoo"/><category term="jmeter"/><category term="load runner"/><category term="performance tool"/><category term="software"/><category term="stress testing"/><category term="testng"/><category term="webdriver"/><title type='text'>Sumit Mittal</title><subtitle type='html'>First, solve the problem. Then, write the code.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>34</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-5512783330613053720</id><published>2014-02-13T15:25:00.000+05:30</published><updated>2014-02-13T15:26:40.941+05:30</updated><title type='text'>Java Script Executor in Selenium Webdriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
Sometime there is problem to click on hidden element. so to click on hidden element you can use java script as below:&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;1. identify element through driver.findelement , suppose its name is element.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2. use below code it will perform click event on hidden element.&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;br /&gt;&amp;nbsp;((JavascriptExecutor)driver).executeScript(&quot;arguments[0].click();&quot;, element);&lt;/h4&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/5512783330613053720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/02/java-script-executor-in-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/5512783330613053720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/5512783330613053720'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/02/java-script-executor-in-selenium.html' title='Java Script Executor in Selenium Webdriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-1223358471159137246</id><published>2014-02-12T16:36:00.000+05:30</published><updated>2014-02-13T15:23:13.133+05:30</updated><title type='text'>Multiple Browser Passing as Parameters</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 style=&quot;text-align: center;&quot;&gt;
&lt;b&gt;Multiple Browser Passing as Parameters&lt;/b&gt;&lt;/h3&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;The Parameter &quot;browser&quot; is passed from TestNG.xml as below:&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Dfg7ZU0OROMAD-FnYyHZLadVIXtrbQ7BT_4XofZYtICfRBkGgZkNzmGo38BYRXXE7GDTVvmUlaVZ2AMvmyGa4i5AjzMbMq9eyJulPBWEU0DgMrl2N7ewjTIig_W7G_nt8BHaX79EnjVu/s1600/334.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Dfg7ZU0OROMAD-FnYyHZLadVIXtrbQ7BT_4XofZYtICfRBkGgZkNzmGo38BYRXXE7GDTVvmUlaVZ2AMvmyGa4i5AjzMbMq9eyJulPBWEU0DgMrl2N7ewjTIig_W7G_nt8BHaX79EnjVu/s1600/334.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;
&lt;b&gt;Then use the below code :&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;@Parameters(&quot;browser&quot;)
    @BeforeClass
    public void beforeTest(String browser) {
           if (browser.equalsIgnoreCase(&quot;firefox&quot;)) {
            FirefoxProfile firefoxProfile = new ProfilesIni().getProfile(&quot;default&quot;);
            driver = new FirefoxDriver(firefoxProfile);
           } else if (browser.equalsIgnoreCase(&quot;chrome&quot;)) {
                  // Set Path for the executable file
                  System.setProperty(&quot;webdriver.chrome.driver&quot;,&quot;D:\\Automation Project WorkSpace\\Experience\\lib\\chromedriver.exe&quot;);
                  driver = new ChromeDriver();
           } else if (browser.equalsIgnoreCase(&quot;ie&quot;)) {
                  // Set Path for the executable file
                  System.setProperty(&quot;webdriver.ie.driver&quot;, &quot;D:\\Automation Project WorkSpace\\Experience\\lib\\IEDriverServer.exe&quot;);
                  driver = new InternetExplorerDriver();
           } else {
                  throw new IllegalArgumentException(&quot;The Browser Type is Undefined&quot;);
           }
           // Open App
           driver.get(&quot;https://www.google.com&quot;);
    }
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/1223358471159137246/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/02/multiple-browser-passing-as-parameters.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/1223358471159137246'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/1223358471159137246'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/02/multiple-browser-passing-as-parameters.html' title='Multiple Browser Passing as Parameters'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_Dfg7ZU0OROMAD-FnYyHZLadVIXtrbQ7BT_4XofZYtICfRBkGgZkNzmGo38BYRXXE7GDTVvmUlaVZ2AMvmyGa4i5AjzMbMq9eyJulPBWEU0DgMrl2N7ewjTIig_W7G_nt8BHaX79EnjVu/s72-c/334.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-4337129761466515897</id><published>2014-01-09T15:53:00.002+05:30</published><updated>2014-02-13T15:27:02.839+05:30</updated><title type='text'>Build.xml Files</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
You can use my Build.xml file and edit it :&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbc3ETeX4bPRCTdGkVoqhuQLpFRWaVqFaN_gKGTzfEFJKjdASIjAGavfO3XUCw90WPVvdzE6KDyUumpxKuojp8S7efOk8TssQpcTs_f7NtkShqeNEL9NvHbCWjmAXit-I6TbEWGkJfygDb/s1600/Untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbc3ETeX4bPRCTdGkVoqhuQLpFRWaVqFaN_gKGTzfEFJKjdASIjAGavfO3XUCw90WPVvdzE6KDyUumpxKuojp8S7efOk8TssQpcTs_f7NtkShqeNEL9NvHbCWjmAXit-I6TbEWGkJfygDb/s1600/Untitled.jpg&quot; height=&quot;640&quot; width=&quot;532&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
you can download it from &lt;a href=&quot;https://www.dropbox.com/s/yc0t9x5aqdkoxd5/build.xml&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/4337129761466515897/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/buildxml-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/4337129761466515897'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/4337129761466515897'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/buildxml-files.html' title='Build.xml Files'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbc3ETeX4bPRCTdGkVoqhuQLpFRWaVqFaN_gKGTzfEFJKjdASIjAGavfO3XUCw90WPVvdzE6KDyUumpxKuojp8S7efOk8TssQpcTs_f7NtkShqeNEL9NvHbCWjmAXit-I6TbEWGkJfygDb/s72-c/Untitled.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2507041878134474703</id><published>2014-01-09T15:31:00.003+05:30</published><updated>2014-01-09T15:48:34.349+05:30</updated><title type='text'>Creating testng.xml to Run Test Suite</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;background-color: white; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;The main advantage of using TestNG framework in Selenium is its ease of running&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;multiple tests from multiple classes using just one configuration (We can also have many configurations, which depends upon how we design our test). Testng.xml is an XML file that describes the runtime definition of a test suite. It describes complex test definition while still remain easy to edit.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
Using Testng.xml file we can run test available in one or more class file and make them as a single&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;group&lt;/em&gt;&lt;/strong&gt;, hence making test more meaningful, we call them as scenario based testing.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
Can I run test without using testng.xml file?&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
Well answer is yes, you can run. But once your test become larger and requires configuration of multiple test at one place, the best option is testng.xml.&lt;/div&gt;
&lt;div style=&quot;background-color: white; box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
The testng.xml file will have following hierarchy&lt;/div&gt;
&lt;ul style=&quot;background-color: white; box-sizing: border-box; list-style-type: square; margin: 16px 0px; padding: 0px 0px 0px 40px;&quot;&gt;
&lt;li style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&lt;div align=&quot;left&quot; style=&quot;box-sizing: border-box;&quot;&gt;
The root tag of this file is &lt;suite&gt;.&lt;/suite&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&lt;div align=&quot;left&quot; style=&quot;box-sizing: border-box;&quot;&gt;
&lt;suite&gt; tag can contain one or more &lt;test&gt; tags.&lt;/test&gt;&lt;/suite&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&lt;div align=&quot;left&quot; style=&quot;box-sizing: border-box;&quot;&gt;
&lt;test&gt; tag can contain one or more &lt;classes&gt; tags.&lt;/classes&gt;&lt;/test&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px;&quot;&gt;&lt;div align=&quot;left&quot; style=&quot;box-sizing: border-box;&quot;&gt;
&lt;classes&gt; tag can contain one or more &lt;method&gt; tags.&lt;/method&gt;&lt;/classes&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;div align=&quot;left&quot; style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
For more information on Tags and other tags that you can use in your XML file,&amp;nbsp;&lt;a href=&quot;http://testng.org/doc/documentation-main.html&quot; style=&quot;box-sizing: border-box; color: #bc360a; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;check out the details here&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
Your xml file with just one test in a one class file will look something like this.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ni8CkW8I0nCsQNu8PC_xr9svQUkUaNnNfiUmw0a15gF1hPs3weZBrYwMRdib_TQZRCdUr_haEKOg6fIoqJy4SiC9SKw5PfFj-51UekZ0Yp8-okDpdBBjEgFizgxtmR-MyWssxEscLhSc/s1600/image_thumb4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ni8CkW8I0nCsQNu8PC_xr9svQUkUaNnNfiUmw0a15gF1hPs3weZBrYwMRdib_TQZRCdUr_haEKOg6fIoqJy4SiC9SKw5PfFj-51UekZ0Yp8-okDpdBBjEgFizgxtmR-MyWssxEscLhSc/s1600/image_thumb4.png&quot; height=&quot;166&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
As you could see above, the Class name has&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Test&lt;/strong&gt;.NewTest, which is nothing but the “&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Fully qualified&lt;/strong&gt;” name of the Class. It means&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;NewTest&lt;/strong&gt;&amp;nbsp;is the class file which is available under package&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Test.&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
Now your&amp;nbsp; Eclipse IDE should look something like this.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-885M9G_JZU65kRif2-zUCDu0hba44BZA6NrSSpZo7DWgKv8MReP32wuPakVHFoTfPfCID4X9ZBxLXusPrYSFobaN80FrG1TKBbfCQyHjDdq9JUpM4zxeL9UhDuM4nIPPAgWHy1qwYw8D/s1600/image_thumb5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-885M9G_JZU65kRif2-zUCDu0hba44BZA6NrSSpZo7DWgKv8MReP32wuPakVHFoTfPfCID4X9ZBxLXusPrYSFobaN80FrG1TKBbfCQyHjDdq9JUpM4zxeL9UhDuM4nIPPAgWHy1qwYw8D/s1600/image_thumb5.png&quot; height=&quot;140&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
I have added the&amp;nbsp;&lt;em style=&quot;box-sizing: border-box;&quot;&gt;testng.xml&lt;/em&gt;&amp;nbsp;file in our project, so that we can use it for running test.&lt;/div&gt;
&lt;h3 style=&quot;box-sizing: border-box; clear: both; color: #141412; font-family: Bitter, Georgia, serif; font-size: 22px; line-height: 1.3; margin: 22px 0px;&quot;&gt;
&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Try Running Test using Testng.xml&lt;/strong&gt;&lt;/h3&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
Just right click on the testng.xml file in package explorer of Eclipse and select&amp;nbsp;&lt;strong style=&quot;box-sizing: border-box;&quot;&gt;Run As Testng Suite,&amp;nbsp;&lt;/strong&gt;the test will run .&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXp8gnJYticLp8fvxyBrpRqUeWozE1u6vRm6RKeYocYvTc3wGFJ2o5_-vNbLxol15RCPpkr16rCiUPjUmSegJBaph-nuoOOPmrGy2xsvBiaQJftjW3lS7b1OD94tPnRGCJLi4qUkhQ3noK/s1600/image6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXp8gnJYticLp8fvxyBrpRqUeWozE1u6vRm6RKeYocYvTc3wGFJ2o5_-vNbLxol15RCPpkr16rCiUPjUmSegJBaph-nuoOOPmrGy2xsvBiaQJftjW3lS7b1OD94tPnRGCJLi4qUkhQ3noK/s1600/image6.png&quot; height=&quot;230&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; font-size: 16px; line-height: 24px; margin-bottom: 24px;&quot;&gt;
if you want to pass parameters create xml file like this:&lt;/div&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 24px;&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilo9xzkixO7GR9T4ol3jk6cGSTWSYPlP4BEZxyNsWh9ystdO77lixCF4scms94BZPm8KXDfd1363iEfQC8jCdcYFQqBpU_VjvxU-7zAK9caLvcVZd-5pElMviRzaL1SouckYJYhzcp22Xo/s1600/Untitled.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilo9xzkixO7GR9T4ol3jk6cGSTWSYPlP4BEZxyNsWh9ystdO77lixCF4scms94BZPm8KXDfd1363iEfQC8jCdcYFQqBpU_VjvxU-7zAK9caLvcVZd-5pElMviRzaL1SouckYJYhzcp22Xo/s1600/Untitled.jpg&quot; height=&quot;217&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #141412; font-family: Source Sans Pro, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; line-height: 24px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;box-sizing: border-box; margin-bottom: 24px;&quot;&gt;
&lt;span style=&quot;color: #141412; font-family: &#39;Source Sans Pro&#39;, Helvetica, sans-serif; line-height: 24px;&quot;&gt;My .java test file looks like this:&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;public class Gmail
{
public WebDriver driver;

 
 
@Test
@Parameters({&quot;Urlsite&quot;})
public void GmailAccess(String value) 
{
driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
try{
driver.get(value);
driver.close();
&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2507041878134474703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/creating-testngxml-to-run-test-suite.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2507041878134474703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2507041878134474703'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/creating-testngxml-to-run-test-suite.html' title='Creating testng.xml to Run Test Suite'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6ni8CkW8I0nCsQNu8PC_xr9svQUkUaNnNfiUmw0a15gF1hPs3weZBrYwMRdib_TQZRCdUr_haEKOg6fIoqJy4SiC9SKw5PfFj-51UekZ0Yp8-okDpdBBjEgFizgxtmR-MyWssxEscLhSc/s72-c/image_thumb4.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2875443518552542062</id><published>2014-01-08T16:37:00.001+05:30</published><updated>2014-01-30T16:25:51.590+05:30</updated><title type='text'>Email your failing Selenium WebDriver scripts’ Stack Trace to your Email Id</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
This is my new post and I am very excited because through this we would be able to find all Stack Trace of our failing WebDriver Scripts.This has been made possible through one of the Java Mail API.&lt;br /&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;1- Pre-requisite&lt;/strong&gt;First we need to download two jar files&lt;br /&gt;
1-&amp;nbsp;javaee-api-5.0.3.jar&lt;br /&gt;
2-&amp;nbsp;javamail1_4_7.zip&lt;br /&gt;
download both file from&amp;nbsp;&lt;a data-skimlinks-orig-link=&quot;&quot; href=&quot;https://www.dropbox.com/s/rg1vj5jw312ftic/JavaMailAPI%20jars.zip&quot; sl-processed=&quot;1&quot; style=&quot;border: 0px; color: #f10d1c; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;here&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
In this Java Mail API we use mainly two packages&lt;br /&gt;
1)&amp;nbsp;javax.mail.internet.&lt;br /&gt;
2)&amp;nbsp;javax.mail&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
In general we use three steps to send mails using Javamail API&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
1- Session Object creation that stores all the information like Host name, username and password&lt;br /&gt;
like this&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Session session = Session.getDefaultInstance(props,new javax.mail.Authenticator() {&lt;br /&gt;
protected PasswordAuthentication getPasswordAuthentication() {&lt;br /&gt;
return new PasswordAuthentication(“usermail_id”,”password”);&lt;br /&gt;
}&lt;br /&gt;
})&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
2- Setting Subject and Message body like this&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
message.setSubject(“Testing Subject”); //this line is used for setting Subject line&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
message.setText(“your test has failed &amp;lt;============================&amp;gt;”+ExceptionUtils.getStackTrace(e) );&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
3- Sending mail that could be done with this line of code&lt;br /&gt;
Transport.send(message);&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;2- Now I am pasting here my code of Mail sending class&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;package test_Scripts;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import org.apache.commons.lang3.exception.ExceptionUtils;
public class SendMail{
public SendMail(String fromMail,String tomail, Exception e )
{
String fileAttachment = &quot;C:\\Users\\Sumit.Mittal\\Desktop\\attach.txt&quot;; 
Properties props = new Properties();
props.put(&quot;mail.smtp.host&quot;, &quot;smtp.gmail.com&quot;);
props.put(&quot;mail.smtp.socketFactory.port&quot;, &quot;465&quot;);
props.put(&quot;mail.smtp.socketFactory.class&quot;,
&quot;javax.net.ssl.SSLSocketFactory&quot;);
props.put(&quot;mail.smtp.auth&quot;, &quot;true&quot;);
props.put(&quot;mail.smtp.port&quot;, &quot;465&quot;);
Session session = Session.getDefaultInstance(props,
new javax.mail.Authenticator() {
protected PasswordAuthentication getPasswordAuthentication() {
return new PasswordAuthentication(&quot;Email_Id&quot;,&quot;password&quot;);
}
});
try {
Message message = new MimeMessage(session);
message.setFrom(new InternetAddress(fromMail));
message.setRecipients(Message.RecipientType.TO,
InternetAddress.parse(tomail));
message.setSubject(&quot;Script failed&quot;);
// create the message part   
MimeBodyPart messageBodyPart =  new MimeBodyPart();  
//fill message  
messageBodyPart.setText(&quot;Test mail one&quot;+ ExceptionUtils.getStackTrace(e));  
Multipart multipart = new MimeMultipart();  
multipart.addBodyPart(messageBodyPart);  
// Part two is attachment  
messageBodyPart = new MimeBodyPart();  
DataSource source =  new FileDataSource(fileAttachment);  
messageBodyPart.setDataHandler( new DataHandler(source));  
messageBodyPart.setFileName(fileAttachment);  
multipart.addBodyPart(messageBodyPart);  
// Put parts in message  
message.setContent(multipart);  
//message.setText(&quot;your test has failed for script name:Name of your scipt &lt;============================&gt;&quot;+ Keys.ENTER+ ExceptionUtils.getStackTrace(e) );
Transport.send(message);
System.out.println(&quot;Mail Sent Done&quot;);
} catch (MessagingException ex) {
throw new RuntimeException(ex);
}
}
}
&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
I have written one class SendMail with one constructor with three parameter. that I would call in my WebDriver script. and When My code would fail some where then It will send the Stack Trace.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;3- My script of WebDriver&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;package test_Scripts;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
public class Except {
WebDriver d;
@BeforeMethod
public void launch()
{
System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;E:\\SumitMittal\\workspace\\chromedriver_win_26.0.1383.0\\chromedriver.exe&quot;);
d = new ChromeDriver();
}
@Test
public void test()
{
d.get(&quot;www.gmail.com&quot;);
try{
WebElement element= d.findElement(By.xpath(&quot;//div/span&quot;));
element.sendKeys(&quot;dwarika&quot;);
}
catch(Exception e)
{
e.printStackTrace();
new SendMail(&quot;Sender_Mailid&quot;,&quot;Receiver_Mailid&quot;,e);
}
}
}
&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; white-space: normal;&quot;&gt;I have tried this code and find that we can use it in our selenium Scripting for sending mail for failing scripts. but I am hoping some more valuable advise from you people to use it in more optimized form.&lt;/span&gt;&lt;span style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; font-style: inherit; line-height: 1.625; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;.So if you have any other method then please let me know about the same.&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2875443518552542062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/email-your-failing-selenium-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2875443518552542062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2875443518552542062'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/email-your-failing-selenium-webdriver.html' title='Email your failing Selenium WebDriver scripts’ Stack Trace to your Email Id'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-7680082470975292324</id><published>2014-01-08T14:58:00.003+05:30</published><updated>2014-01-08T15:00:02.083+05:30</updated><title type='text'>Handling JavaScript Alert in WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Handling JavaScript Alert is big question if you have just started learning WebDriver. Because we always get multiple pop-ups some time we get information about validity of input and some time these pop-up speaks about error, and also about response.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
But as a tester we need to verify the alert message and for the same we need to handle the Alert pop up. So its time to celebrate because WebDriver have provided us with&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Alert&lt;/strong&gt;class to deal with JavaScript Alert.&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_Zc_kF9zbSZCBViqL76oCEVld1ruy4E-N12NvqgkTO-ENi5-BJsXLduZtKz_SiEghhQ61mgazWcToL5U28MUURVN6V_td9kxFrRXh8PMMaltR3NFxEZXqDQJj_3VkifZGgiwiEZWdvq7/s1600/alert.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_Zc_kF9zbSZCBViqL76oCEVld1ruy4E-N12NvqgkTO-ENi5-BJsXLduZtKz_SiEghhQ61mgazWcToL5U28MUURVN6V_td9kxFrRXh8PMMaltR3NFxEZXqDQJj_3VkifZGgiwiEZWdvq7/s1600/alert.png&quot; height=&quot;114&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Since I have created this alert through a basic html file and &amp;nbsp;it has one button Ok. Butthere is another kind of alert known as Confirm Box Alert and it normally have two button&lt;br /&gt;
1-Ok button&lt;br /&gt;
2- Cancel button&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Since both alert is handled in the same way so here I am taking the Confirm Box Alert here&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Scenario : Suppose we have one button, and once we hit on the button a alert appears with two button Ok and Cancel&lt;br /&gt;
a) In first case if end user click on Ok button&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;@Test
public void testAlertOk()
{
//Now we would click on AlertButton
WebElement button = driver.findElement(By.id(&quot;AlerButton&quot;));
button.click();
try {
//Now once we hit AlertButton we get the alert
Alert alert = driver.switchTo().alert();
//Text displayed on Alert using getText() method of Alert class
String AlertText = alert.getText();
//accept() method of Alert Class is used for ok button
alert.accept();
//Verify Alert displayed correct message to user
assertEquals(&quot;this is alert box&quot;,AlertText);
} catch (Exception e) {
e.printStackTrace();
}
}
&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;b) In second case we want to click on Cancel button&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
So above code would remain same only thing that would change in above script is&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline; white-space: normal;&quot;&gt;
&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;alert.accept();
&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;For clicking on Cancel we need to use&amp;nbsp;dismiss() method of Alert Class&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;alert.dismiss();
&lt;/pre&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;&lt;/pre&gt;
&lt;span style=&quot;background-color: white; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;Hope this script would help you to handle Alert in WebDriver&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/7680082470975292324/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/handling-javascript-alert-in-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/7680082470975292324'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/7680082470975292324'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/handling-javascript-alert-in-webdriver.html' title='Handling JavaScript Alert in WebDriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiW_Zc_kF9zbSZCBViqL76oCEVld1ruy4E-N12NvqgkTO-ENi5-BJsXLduZtKz_SiEghhQ61mgazWcToL5U28MUURVN6V_td9kxFrRXh8PMMaltR3NFxEZXqDQJj_3VkifZGgiwiEZWdvq7/s72-c/alert.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-1685837071238703721</id><published>2014-01-08T14:53:00.002+05:30</published><updated>2014-01-08T14:53:55.497+05:30</updated><title type='text'>Implicit Wait in WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Implicit wait in WebDriver has solved the compile error of Element not found. Element not found kind of error mostly comes in to picture due to slow internet connection or some time due to responses time of Website or web-application and due to which expected element on the website/webpage takes more time to appear. This cause failure of test script written for that specific element on webpage.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Implicit wait in webdriver synchronize test. This implicit wait implementation in test ensure first that element is available in DOM(Data Object Model) or not if not then it wait for the element for a specific time to wait for appearance of element on Webpage.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Normally Implicit wait do the polling of DOM and every time when it does not find any element then it wait for that element for certain time and due to this execution of test become a slow process because implicit wait keep script waiting.Due to this people who are very sophisticated in writing selenium webdriver code advise not to use it in script and for good script implicit wait should be avoided.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Ok come to the point WebDriver API has one Interface named as Timeouts and this is used for implicit wait and since this is interface so have one function named as implicitlyWait(), this method takes the argument of time in Second, and this code is written like this&lt;/div&gt;
&lt;pre style=&quot;background-color: #f4f4f4; border: 0px; color: #373737; font-family: &#39;Courier 10 Pitch&#39;, Courier, monospace; font-size: 13px; line-height: 1.5; margin-bottom: 1.625em; outline: 0px; overflow: auto; padding: 0.75em 1.625em; vertical-align: baseline;&quot;&gt;driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);&lt;/pre&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Here I have taken 5 second as wait, once script see any findElement() method then it goes for 5 second wait.&lt;br /&gt;But this keeps script waiting for 5 second once it see a findElement() method so WebDriver API has introduced one explicit wait and in this WebDriverwait class play a very important role.&lt;br /&gt;So in next post I would let you know about the Explicit wait and i would suggest to use explicit wait.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/1685837071238703721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/implicit-wait-in-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/1685837071238703721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/1685837071238703721'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/implicit-wait-in-webdriver.html' title='Implicit Wait in WebDriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-897151844027462030</id><published>2014-01-08T13:41:00.003+05:30</published><updated>2014-01-08T13:46:56.042+05:30</updated><title type='text'>Contains() and starts-with() function in Xpath</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 class=&quot;entry-title&quot; style=&quot;background-color: white; border: 0px; clear: both; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 36px; line-height: 48px; margin: 0px; outline: 0px; padding: 15px 0px 0.3em; vertical-align: baseline;&quot;&gt;
Contains() and starts-with() function in&amp;nbsp;Xpath&lt;/h1&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiil7kEBFos94cgXtbdBS7yj4Xybgcd5D4cxwB6cIfmT_miRREiuGPe5gAodd-rytF9O60-26g0TlhAzgmVM6Z42fI4hxiRmsq9PHtWPmdh6IidTE6-wU66nhQ2cCUAvADi9WQFXwx8du3g/s1600/myscreenshot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiil7kEBFos94cgXtbdBS7yj4Xybgcd5D4cxwB6cIfmT_miRREiuGPe5gAodd-rytF9O60-26g0TlhAzgmVM6Z42fI4hxiRmsq9PHtWPmdh6IidTE6-wU66nhQ2cCUAvADi9WQFXwx8du3g/s1600/myscreenshot.png&quot; height=&quot;227&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Here&amp;nbsp; as we can see we want to search Google Search just by writing its xpath in console&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
So to find the Google Search button we have to write xpath like this&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; border: 0px; color: #373737; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: &#39;&#39;; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//span[@id=&#39;gbqfsa&#39;]&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Once we hit enter it would bring&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; border: 0px; color: #373737; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: &#39;&#39;; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/strong&gt;&lt;/div&gt;
&lt;ol style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.625em 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span id=&quot; &amp;lt;span class=&quot; style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;gbqfsa&lt;/span&gt;&quot;&amp;gt;​Google Search​​&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;],&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
It shows that xpath for Google Search Button is correctly written&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
Now suppose we want to search&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Google Search&lt;/strong&gt;&amp;nbsp;button if we are just familiar that id attributes start with gbqfs&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
then we have to use function starts-with like this&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; border: 0px; color: #373737; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: &#39;&#39;; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//span[starts-with(@id,&#39;gbqfs&#39;)]&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
and once when we hit enter on console it would reflect two button one is&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Google Search&lt;/strong&gt;and Second one is&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;I’m Feeling Lucky&lt;/strong&gt;&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; border: 0px; color: #373737; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: &#39;&#39;; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/strong&gt;&lt;/div&gt;
&lt;ol style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.625em 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;gbqfsa&quot;&amp;gt;​Google Search​​&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;,&lt;/strong&gt;&lt;/div&gt;
&lt;ol style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.625em 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span gbqfsb=&quot;&quot; id=&quot;​&quot;&gt;​I&#39;m Feeling Lucky​&lt;/span&gt;​&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;]&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
So to find out the Google Search uniquely we need to complete id attribute to&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;gbqfsa&lt;/strong&gt;&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; border: 0px; color: #373737; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: &#39;&#39;; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;“//span[starts-with(@id,&#39;gbqfsa&#39;)]&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
and hit to enter and now it would reflect only&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/strong&gt;&lt;/div&gt;
&lt;ol style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.625em 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span gbqfsa=&quot;&quot; id=&quot;​&quot;&gt;​Google Search​&lt;/span&gt;​&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;],&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
It proves that we have written right xpath for Google Search&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
In the same fashion we can use&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Contains function&lt;/strong&gt;&amp;nbsp;to find the Google Search button like this&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
here I have taken&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;fsa&lt;/strong&gt;&amp;nbsp;from&amp;nbsp;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;gbqfsa&lt;/strong&gt;&lt;/div&gt;
&lt;blockquote style=&quot;background-color: white; border: 0px; color: #373737; font-family: Georgia, &#39;Bitstream Charter&#39;, serif; font-size: 15px; font-style: italic; line-height: 24px; margin: 0px 3em; outline: 0px; padding: 0px; quotes: &#39;&#39;; vertical-align: baseline;&quot;&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//span[contains(@id,&#39;fsa&#39;)] &amp;nbsp;hit enter and hopefully it will return&amp;nbsp;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;[&lt;/strong&gt;&lt;/div&gt;
&lt;ol style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1.625em 2.5em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot; title=&quot;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span gbqfsa=&quot;&quot; id=&quot;​&quot;&gt;​Google Search​&lt;/span&gt;​&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div style=&quot;border: 0px; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;],&lt;/strong&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
if there are multiple attributes then we can use:&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;//span[contains(@id,&#39;fsa&#39;) and contains(@class, &#39;xyz&#39;)] &amp;nbsp;hit enter and hopefully it will return&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/897151844027462030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/contains-and-starts-with-function-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/897151844027462030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/897151844027462030'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/contains-and-starts-with-function-in.html' title='Contains() and starts-with() function in Xpath'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiil7kEBFos94cgXtbdBS7yj4Xybgcd5D4cxwB6cIfmT_miRREiuGPe5gAodd-rytF9O60-26g0TlhAzgmVM6Z42fI4hxiRmsq9PHtWPmdh6IidTE6-wU66nhQ2cCUAvADi9WQFXwx8du3g/s72-c/myscreenshot.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-3411687583451006765</id><published>2014-01-08T13:21:00.003+05:30</published><updated>2014-01-14T12:56:35.206+05:30</updated><title type='text'>Launch Chrome Browser Using WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;Launching Chrome Browser using WebDriver&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
In WebDriver, We launch FireFox and Internet Explorer by using&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;em id=&quot;__mceDel&quot; style=&quot;border: 0px; font-family: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;WebDriver driver =&amp;nbsp;new FirefoxDriver(); //this line would launch Firefox&lt;br /&gt;WebDriver&amp;nbsp;driver = new InternetExplorerDriver(); //this line would launch IE browser&lt;/strong&gt;&lt;/em&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
But when we write below line like FireFox and IE&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;WebDriver driver = new ChromeDriver();&lt;/strong&gt;&lt;br /&gt;
Then It throws Error and Here I am pasting Error Trace shown in Eclipse&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;span style=&quot;border: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.chrome.driver system property; for more information, see&lt;a href=&quot;http://code.google.com/p/selenium/wiki/ChromeDriver&quot; rel=&quot;nofollow&quot; sl-processed=&quot;1&quot; style=&quot;border: 0px; color: #f10d1c; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;http://code.google.com/p/selenium/wiki/ChromeDriver&lt;/a&gt;. The latest version can be downloaded from&amp;nbsp;&lt;a href=&quot;http://code.google.com/p/chromedriver/downloads/list&quot; rel=&quot;nofollow&quot; sl-processed=&quot;1&quot; style=&quot;border: 0px; color: #f10d1c; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;http://code.google.com/p/chromedriver/downloads/list&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
at com.google.common.base.Preconditions.checkState(Preconditions.java:176)&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
IT seems really tedious na, But there is one way to resolve this Error and this could be done by using this&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
1- Download zip file of chromedriver for Windows from&amp;nbsp;&lt;a href=&quot;https://www.dropbox.com/s/u5i7j87ww5e0qe1/chromedriver_win32.zip&quot; sl-processed=&quot;1&quot; style=&quot;border: 0px; color: #f10d1c; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; text-decoration: none; vertical-align: baseline;&quot; title=&quot;Chrome Driver&quot;&gt;here&lt;/a&gt;&lt;br /&gt;
2- Unzip downloaded Chromedriver for Windows and find the absolute path of chromedriver.exe&lt;br /&gt;
3- Now set Property of System by using this line&lt;br /&gt;
&lt;strong style=&quot;border: 0px; font-family: inherit; font-style: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;span style=&quot;border: 0px; color: #339966; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;System.setProperty(“webdriver.chorme.driver”,”E:\\SumitMittal\\workspace\\chromedriver_win_26.0.1383.0\\chromedriver.exe”);&lt;/span&gt;&lt;br /&gt;and after this line write your traditional line to launch the browser like this&lt;br /&gt;&lt;span style=&quot;border: 0px; color: #339966; font-family: inherit; font-style: inherit; font-weight: inherit; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;WebDriver driver =new ChromeDriver();&lt;/span&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
So why not we write one script that help us to see the launching of Chrome&lt;br /&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 13px; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class Chrome {
WebDriver driver;
@Before
public void launchChrome()
{
System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;E:\\SumitMittal\\workspace\\chromedriver_win_26.0.1383.0\\chromedriver.exe&quot;);
driver = new ChromeDriver();
}
@Test
public void testChrome()
{
driver.get(&quot;http://www.google.co.in&quot;);
driver.findElement(By.id(&quot;gbqfq&quot;)).sendKeys(&quot;Selenium&quot;);
}
@After
public void kill()
{
driver.close();
driver.quit();
}
}
&lt;/pre&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 13px; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;


&lt;/code&gt;&lt;br /&gt;
&lt;div style=&quot;background-color: white; border: 0px; color: #373737; font-family: &#39;Helvetica Neue&#39;, Helvetica, Arial, sans-serif; font-size: 15px; line-height: 24px; margin-bottom: 1.625em; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 13px; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;This code is verified at my own and if there is any&amp;nbsp;suggestion&amp;nbsp;then please let me know. I would be very happy to hear from you.&lt;/code&gt;&lt;/div&gt;
&lt;code style=&quot;border: 0px; font-family: Monaco, Consolas, &#39;Andale Mono&#39;, &#39;DejaVu Sans Mono&#39;, monospace; font-size: 13px; line-height: normal; margin: 0px; outline: 0px; padding: 0px; vertical-align: baseline;&quot;&gt;
&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/3411687583451006765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/launch-chrome-browser-using-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/3411687583451006765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/3411687583451006765'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/launch-chrome-browser-using-webdriver.html' title='Launch Chrome Browser Using WebDriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-8334599269017662085</id><published>2014-01-07T16:00:00.000+05:30</published><updated>2014-01-07T16:00:00.347+05:30</updated><title type='text'>Check If An Element Exists</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;background-color: white; font-family: Impact, sans-serif; font-size: 20px; font-weight: normal; margin: 0px 0px 0.5em; position: relative;&quot;&gt;
Check If An Element Exists&lt;/h2&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;You may need to perform a action based on a specific web element being present on the web page. You can use below code snippet to check if a element with id “element-id” exists on web page.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;driver.findElements(By.id(&quot;element-id&quot;)).size()!=0

&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/8334599269017662085/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/check-if-element-exists.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/8334599269017662085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/8334599269017662085'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/check-if-element-exists.html' title='Check If An Element Exists'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2592743556348513908</id><published>2014-01-07T15:56:00.001+05:30</published><updated>2014-01-07T15:58:48.880+05:30</updated><title type='text'>Instantiate Specific Browser Or Client</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;background-color: white; font-family: Impact, sans-serif; font-size: 20px; font-weight: normal; margin: 0px 0px 0.5em; position: relative; text-align: center;&quot;&gt;
Instantiate Specific Browser Or Client&lt;/h2&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;strong&gt;Firefox Driver&lt;/strong&gt;&lt;/div&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-j&quot; style=&quot;border: none; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-width: 3px; border-style: none none none solid; color: inherit; line-height: 14px; list-style: decimal-leading-zero outside !important; margin-bottom: 0.25em; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;WebDriver&amp;nbsp;driver&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;FirefoxDriver();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;Chrome Driver&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-j&quot; style=&quot;border: none; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-width: 3px; border-style: none none none solid; color: inherit; line-height: 14px; list-style: decimal-leading-zero outside !important; margin-bottom: 0.25em; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;WebDriver&amp;nbsp;driver&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;ChromeDriver();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;Safari Driver&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-j&quot; style=&quot;border: none; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-width: 3px; border-style: none none none solid; color: inherit; line-height: 14px; list-style: decimal-leading-zero outside !important; margin-bottom: 0.25em; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;WebDriver&amp;nbsp;driver&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;SafariDriver();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;Internet Explorer Driver&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 22px;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 15px; line-height: 22px;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;WebDriver driver = new InternetExplorerDriver();&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 15px; line-height: 22px;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif;&quot;&gt;&lt;b&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;Android Driver&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-j&quot; style=&quot;border: none; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-width: 3px; border-style: none none none solid; color: inherit; line-height: 14px; list-style: decimal-leading-zero outside !important; margin-bottom: 0.25em; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;WebDriver&amp;nbsp;driver&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;AndroidDriver()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;iPhone Driver&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-j&quot; style=&quot;border: none; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-width: 3px; border-style: none none none solid; color: inherit; line-height: 14px; list-style: decimal-leading-zero outside !important; margin-bottom: 0.25em; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;WebDriver&amp;nbsp;driver&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;IPhoneDriver();&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;strong style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;HTML Unit&lt;/strong&gt;&lt;br /&gt;
&lt;div class=&quot;dp-highlighter&quot; style=&quot;background-color: white; color: #333333; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 15px; line-height: 22px;&quot;&gt;
&lt;div class=&quot;bar&quot; style=&quot;padding-left: 45px;&quot;&gt;
&lt;div class=&quot;tools&quot; style=&quot;background-color: #f8f8f8; border-left-color: rgb(108, 226, 108); border-left-style: solid; border-left-width: 3px; color: silver; font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; font-size: 9px; line-height: normal; padding: 3px 8px 10px 10px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;ol class=&quot;dp-j&quot; style=&quot;border: none; color: #5c5c5c; list-style-image: initial; list-style-position: initial; margin: 0px 0px 1px 45px !important; padding: 0px;&quot;&gt;
&lt;li class=&quot;alt&quot; style=&quot;border-left-color: rgb(108, 226, 108); border-left-width: 3px; border-style: none none none solid; color: inherit; line-height: 14px; list-style: decimal-leading-zero outside !important; margin-bottom: 0.25em; margin-left: 0px !important; margin-right: 0px !important; margin-top: 0px !important; padding-bottom: 0px; padding-left: 10px !important; padding-right: 3px !important; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; color: black; margin: 0px; padding: 0px;&quot;&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;WebDriver&amp;nbsp;driver&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;keyword&quot; style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;background-color: inherit; border: none; margin: 0px; padding: 0px;&quot;&gt;&amp;nbsp;HtmlUnitDriver()&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2592743556348513908/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/instantiate-specific-browser-or-client.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2592743556348513908'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2592743556348513908'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/instantiate-specific-browser-or-client.html' title='Instantiate Specific Browser Or Client'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2686257162200677128</id><published>2014-01-07T15:50:00.002+05:30</published><updated>2014-01-07T16:13:35.973+05:30</updated><title type='text'>Reading from XML to trigger a Selenium driver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;line-height: 22px;&quot;&gt;Reading from XML to trigger a Selenium driver&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5802029727636741871&quot; itemprop=&quot;description articleBody&quot; style=&quot;line-height: 1.4; width: 920px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;post-body entry-content&quot; id=&quot;post-body-5802029727636741871&quot; itemprop=&quot;description articleBody&quot; style=&quot;line-height: 1.4; width: 920px;&quot;&gt;
xml:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzNUxMIpTRCygRupIW_g3tBQG9PoI7flsh5c1_qF8JZ2f3ZPZixuoy3DaNjKMzpNNVEeDYh0wsilyzle6HziAcUVaDnhMJda3FDSmGg3qDAbVMbbUY1zZGrT3EDztmsVPFg2CCA1F4Dco3/s1600/xml.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzNUxMIpTRCygRupIW_g3tBQG9PoI7flsh5c1_qF8JZ2f3ZPZixuoy3DaNjKMzpNNVEeDYh0wsilyzle6HziAcUVaDnhMJda3FDSmGg3qDAbVMbbUY1zZGrT3EDztmsVPFg2CCA1F4Dco3/s1600/xml.jpg&quot; height=&quot;248&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Java code:&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;/*

* @ Author : Sumit Mittal

* @ Description : A simple program to read XML and retrieve data to manipulate Selenium webdriver

* @ Date : 1/03/2014

*/

import java.io.File;

import javax.xml.parsers.DocumentBuilder;

import javax.xml.parsers.DocumentBuilderFactory;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.*;

import org.w3c.dom.*;



public class GmailXMLTest {



public static void main(String argv[]) {



try {

File file = new File(&quot;C:\\TestData.xml&quot;); //file location should be specified correctly

// Prepare XML

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

DocumentBuilder db = dbf.newDocumentBuilder();

Document document = db.parse(file);

document.getDocumentElement().normalize();

System.out.println(&quot;Debug: Root element&quot;+ document.getDocumentElement().getNodeName());

NodeList node = document.getElementsByTagName(&quot;TestData&quot;);

System.out.println(&quot;TestData Details&quot;);

System.out.println(&quot;________________________________________________&quot;);



//Read XML to get test data



for (int i = 0; i &amp;lt; node.getLength(); i++) {

Node currentNode = node.item(i);



if (currentNode.getNodeType() == Node.ELEMENT_NODE) {



Element element = (Element) currentNode;

NodeList mailServerElemntList = element.getElementsByTagName(&quot;service&quot;);

Element mailServer = (Element) mailServerElemntList.item(0);

NodeList mailServer1 = mailServer.getChildNodes();

String Service = ((Node)mailServer1.item(0)).getNodeValue();

System.out.println(&quot;Mail Servername:&quot;+ Service);



NodeList emailNodeElementList = element.getElementsByTagName(&quot;email-id&quot;);

Element emailNodeElement = (Element)emailNodeElementList.item(0);

NodeList details = emailNodeElement.getChildNodes();

String emailAddress=((Node) details.item(0)).getNodeValue();

System.out.println(&quot;email :&quot; + emailAddress);



NodeList passwordNodeElementList = element.getElementsByTagName(&quot;password&quot;);

Element passwordNodeElement = (Element) passwordNodeElementList.item(0);

NodeList address = passwordNodeElement.getChildNodes();

String passCode = ((Node) address.item(0)).getNodeValue();

System.out.println(&quot;Password : &quot;+passCode);



NodeList destFolder = element.getElementsByTagName(&quot;folder&quot;);

Element destElement = (Element) destFolder.item(0);

NodeList city = destElement.getChildNodes();

String destnFolder = ((Node) city.item(0)).getNodeValue();

System.out.println(&quot;Folder : &quot; + destnFolder);



FirefoxDriver wd = new FirefoxDriver();

wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);

wd.get(Service);

wd.findElement(By.id(&quot;Email&quot;)).sendKeys(emailAddress);

wd.findElement(By.id(&quot;Passwd&quot;)).sendKeys(passCode);

wd.findElement(By.id(&quot;signIn&quot;)).click();

Thread.sleep(8000);

System.out.println(wd.getTitle());

System.out.println(wd.getCurrentUrl());

if (!wd.getCurrentUrl().equals(&quot;https://mail.google.com/mail/?shva=1#inbox&quot;)) {

wd.close();

System.out.println(&quot;Failed to navigate to inbox&quot;);

throw new RuntimeException(&quot;assertTitle failed&quot;);

}

System.out.println(&quot;Test Completed - login passed and navigated to inbox&quot;);

wd.close();



}

}}

catch (Exception e) {e.printStackTrace();}

}

}

&lt;/pre&gt;
&lt;div style=&quot;clear: both;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;post-footer&quot; style=&quot;line-height: 1.6; margin: 1.5em 0px 0px;&quot;&gt;
&lt;div class=&quot;post-footer-line post-footer-line-1&quot;&gt;
&lt;span class=&quot;post-comment-link&quot; style=&quot;background-color: #3d85c6; color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 20px; margin-left: 0px; margin-right: 1em;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #3d85c6; color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;span class=&quot;post-icons&quot; style=&quot;background-color: #3d85c6; color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 20px; margin-right: 1em;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;background-color: #3d85c6; color: #666666; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 20px;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;post-share-buttons goog-inline-block&quot; style=&quot;background-color: #3d85c6; color: #666666; display: inline-block; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 20px; margin-right: 0px; margin-top: 0.5em; position: relative; vertical-align: middle;&quot;&gt;
&lt;a class=&quot;goog-inline-block share-button sb-email&quot; href=&quot;http://www.blogger.com/share-post.g?blogID=5029140279034631610&amp;amp;postID=5802029727636741871&amp;amp;target=email&quot; style=&quot;background-image: url(https://www.blogger.com/img/share_buttons_20_2.png) !important; background-position: 0px 0px !important; background-repeat: no-repeat no-repeat !important; color: #4d469c; display: inline-block; height: 20px; margin-left: -1px; overflow: hidden; position: relative; text-decoration: none; width: 20px;&quot; target=&quot;_blank&quot; title=&quot;Email This&quot;&gt;&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2686257162200677128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/reading-from-xml-to-trigger-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2686257162200677128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2686257162200677128'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/reading-from-xml-to-trigger-selenium.html' title='Reading from XML to trigger a Selenium driver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhzNUxMIpTRCygRupIW_g3tBQG9PoI7flsh5c1_qF8JZ2f3ZPZixuoy3DaNjKMzpNNVEeDYh0wsilyzle6HziAcUVaDnhMJda3FDSmGg3qDAbVMbbUY1zZGrT3EDztmsVPFg2CCA1F4Dco3/s72-c/xml.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-1100674330751217721</id><published>2014-01-07T15:48:00.000+05:30</published><updated>2014-01-07T15:48:01.130+05:30</updated><title type='text'>How to Run .exe file through Selenium Webdriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
How to Run .exe file through Selenium Webdriver&lt;/h2&gt;
Use the below code :) &lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;java.lang.Runtime.getRuntime().exec(&quot;D:/Automation Project WorkSpace/AceQATesting/upload.exe&quot;);
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/1100674330751217721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/how-to-run-exe-file-through-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/1100674330751217721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/1100674330751217721'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/how-to-run-exe-file-through-selenium.html' title='How to Run .exe file through Selenium Webdriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-957795553077919622</id><published>2014-01-07T15:39:00.001+05:30</published><updated>2014-01-07T15:40:49.116+05:30</updated><title type='text'>Working with Dropdown using Selenium Webdriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
Working with Dropdown using Selenium Webdriver&lt;/h2&gt;
&lt;br /&gt;
Just wrap your WebElement into Select Object as shown below&lt;br /&gt;
&lt;br /&gt;
Select dropdown = new Select(driver.findElement(By.id(&quot;identifier&quot;)));&lt;br /&gt;
Once this is done you can select the required value in 3 ways. Consider an HTML file like this&lt;br /&gt;
&lt;br /&gt;
Below is the drop down :)&lt;br /&gt;
&lt;select id=&quot;designation&quot;&gt;
&lt;option value=&quot;MD&quot;&gt;MD&lt;/option&gt;
&lt;option value=&quot;prog&quot;&gt; Programmer &lt;/option&gt;
&lt;option value=&quot;CEO&quot;&gt; CEO &lt;/option&gt;
&lt;/select&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;body&gt;&lt;/body&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now to identify dropdown do
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;Select dropdown = new Select(driver.findElement(By.id(&quot;designation&quot;)));
&lt;/pre&gt;
To select its option say &#39;Programmer&#39; you can do
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;dropdown.selectByVisibleText(&quot;Programmer &quot;);
&lt;/pre&gt;
or
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt; dropdown.selectByIndex(1);
&lt;/pre&gt;
or
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;  dropdown.selectByValue(&quot;prog&quot;);
&lt;/pre&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/957795553077919622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/working-with-dropdown-using-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/957795553077919622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/957795553077919622'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/working-with-dropdown-using-selenium.html' title='Working with Dropdown using Selenium Webdriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-4747661149342557842</id><published>2014-01-07T15:31:00.001+05:30</published><updated>2014-02-13T15:19:52.911+05:30</updated><title type='text'>How to Take Screenshot using WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h2 style=&quot;text-align: center;&quot;&gt;
How to Take Screenshot using WebDriver&lt;/h2&gt;
&lt;br /&gt;
Below is the code use it in you function to get the screenshot:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush: csharp&quot;&gt;
File ScreenShot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
StringBuilder FileName = new StringBuilder(&quot;Path or FolderLocation&quot;);
FileName.append(ScreenshotFirstName);
FileName.append(&quot;_&quot;);
FileName.append(dateFormat.format(date).toString());
FileName.append(&quot;.jpeg&quot;);
FileUtils.copyFile(ScreenShot, new File(FileName.toString()));
 
&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/4747661149342557842/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/how-to-take-screenshot-using-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/4747661149342557842'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/4747661149342557842'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2014/01/how-to-take-screenshot-using-webdriver.html' title='How to Take Screenshot using WebDriver'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2909821557576985531</id><published>2012-01-24T12:22:00.000+05:30</published><updated>2012-01-24T12:23:34.308+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="load runner"/><category scheme="http://www.blogger.com/atom/ns#" term="performance testing"/><category scheme="http://www.blogger.com/atom/ns#" term="performance tool"/><title type='text'>How load runner works..</title><content type='html'>&lt;a href=&quot;http://www.esnips.com/displayimage.php?album=4571141&amp;amp;pid=33370315&amp;amp;uid=1114399#top_display_media&quot;&gt;My Documents - LoadTesting ppt - eSnips&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2909821557576985531/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/my-documents-loadtesting-ppt-esnips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2909821557576985531'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2909821557576985531'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/my-documents-loadtesting-ppt-esnips.html' title='How load runner works..'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2443951052805809489</id><published>2012-01-23T10:55:00.001+05:30</published><updated>2012-01-23T10:55:48.772+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="performance testing"/><category scheme="http://www.blogger.com/atom/ns#" term="stress testing"/><title type='text'>Performance vs. load vs. stress testing</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Performance testing&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The goal of performance testing is not to find bugs, but to eliminate bottlenecks and establish a baseline for future regression testing. To conduct performance testing is to engage in a carefully controlled process of measurement and analysis. Ideally, the software under test is already stable enough so that this process can proceed smoothly.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
A clearly defined set of expectations is essential for meaningful performance testing. If you don’t know where you want to go in terms of the performance of the system, then it matters little which direction you take (remember Alice and the Cheshire Cat?). For example, for a Web application, you need to know at least two things:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;expected load in terms of concurrent users or HTTP connections&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;acceptable response time&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Once you know where you want to be, you can start on your way there by constantly increasing the load on the system while looking for bottlenecks. To take again the example of a Web application, these bottlenecks can exist at multiple levels, and to pinpoint them you can use a variety of tools:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;at the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;application level&lt;/span&gt;, developers can use profilers to spot inefficiencies in their code (for example poor search algorithms)&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;at the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;database level&lt;/span&gt;, developers and DBAs can use database-specific profilers and query optimizers&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;at the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;operating system level&lt;/span&gt;, system engineers can use utilities such as top, vmstat, iostat (on Unix-type systems) and PerfMon (on Windows) to monitor hardware resources such as CPU, memory, swap, disk I/O; specialized kernel monitoring software can also be used&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;at the&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;network level&lt;/span&gt;, network engineers can use packet sniffers such as tcpdump, network protocol analyzers such as ethereal, and various utilities such as netstat, MRTG, ntop, mii-tool&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
From a testing point of view, the activities described above all take a white-box approach, where the system is inspected and monitored “from the inside out” and from a variety of angles. Measurements are taken and analyzed, and as a result, tuning is done.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
However, testers also take a black-box approach in running the load tests against the system under test. For a Web application, testers will use tools that simulate concurrent users/HTTP connections and measure response times. Some lightweight open source tools I’ve used in the past for this purpose are&lt;a href=&quot;http://httpd.apache.org/docs/programs/ab.html&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;ab&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://www.joedog.org/siege/&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;siege&lt;/a&gt;,&amp;nbsp;&lt;a href=&quot;http://www.hpl.hp.com/personal/David_Mosberger/httperf.html&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;httperf&lt;/a&gt;. A more heavyweight tool I haven’t used yet is&amp;nbsp;&lt;a href=&quot;http://www.opensta.org/&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;OpenSTA&lt;/a&gt;. I also haven’t used&amp;nbsp;&lt;a href=&quot;http://grinder.sourceforge.net/&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;The Grinder&lt;/a&gt;&amp;nbsp;yet, but it is high on my TODO list.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
When the results of the load test indicate that performance of the system does not meet its expected goals, it is time for tuning, starting with the application and the database. You want to make sure your code runs as efficiently as possible and your database is optimized on a given OS/hardware configurations. TDD practitioners will find very useful in this context a framework such as Mike Clark’s&lt;a href=&quot;http://www.clarkware.com/software/JUnitPerf.html&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;jUnitPerf&lt;/a&gt;, which enhances existing unit test code with load test and timed test functionality. Once a particular function or method has been profiled and tuned, developers can then wrap its unit tests in jUnitPerf and ensure that it meets performance requirements of load and timing. Mike Clark calls this “&lt;a href=&quot;http://www.javapronews.com/javapronews-47-20030721ContinuousPerformanceTestingwithJUnitPerf.html&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;continuous performance testing&lt;/a&gt;“. I should also mention that I’ve done an initial port of jUnitPerf to Python — I called it&amp;nbsp;&lt;a href=&quot;http://sourceforge.net/projects/pyunitperf&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;pyUnitPerf&lt;/a&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
If, after tuning the application and the database, the system still doesn’t meet its expected goals in terms of performance, a wide array of tuning procedures is available at the all the levels discussed before. Here are some examples of things you can do to enhance the performance of a Web application outside of the application code per se:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Use Web cache mechanisms, such as the one provided by&amp;nbsp;&lt;a href=&quot;http://www.squid-cache.org/&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;Squid&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Publish highly-requested Web pages statically, so that they don’t hit the database&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Scale the Web server farm horizontally via load balancing&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Scale the database servers horizontally and split them into read/write servers and read-only servers, then load balance the read-only servers&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Scale the Web and database servers vertically, by adding more hardware resources (CPU, RAM, disks)&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Increase the available network bandwidth&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Performance tuning can sometimes be more art than science, due to the sheer complexity of the systems involved in a modern Web application. Care must be taken to modify one variable at a time and redo the measurements, otherwise multiple changes can have subtle interactions that are hard to qualify and repeat.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
In a standard test environment such as a test lab, it will not always be possible to replicate the production server configuration. In such cases, a staging environment is used which is a subset of the production environment. The expected performance of the system needs to be scaled down accordingly.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
The cycle “run load test-&amp;gt;measure performance-&amp;gt;tune system” is repeated until the system under test achieves the expected levels of performance. At this point, testers have a baseline for how the system behaves under normal conditions. This baseline can then be used in regression tests to gauge how well a new version of the software performs.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Another common goal of performance testing is to establish benchmark numbers for the system under test. There are many industry-standard benchmarks such as the ones published by&amp;nbsp;&lt;a href=&quot;http://www.tpc.org/default.asp&quot; style=&quot;color: #2d8ac7; outline-color: initial; outline-style: none; outline-width: initial; text-decoration: none;&quot;&gt;TPC&lt;/a&gt;, and many hardware/software vendors will fine-tune their systems in such ways as to obtain a high ranking in the TCP top-tens. It is common knowledge that one needs to be wary of any performance claims that do not include a detailed specification of all the hardware and software configurations that were used in that particular test.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Load testing&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
We have already seen load testing as part of the process of performance testing and tuning. In that context, it meant constantly increasing the load on the system via automated tools. For a Web application, the load is defined in terms of concurrent users or HTTP connections.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
In the testing literature, the term “load testing” is usually defined as the process of exercising the system under test by feeding it the largest tasks it can operate with. Load testing is sometimes called&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;volume testing&lt;/span&gt;, or&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;longevity/endurance testing&lt;/span&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Examples of volume testing:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;testing a word processor by editing a very large document&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;testing a printer by sending it a very large job&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;testing a mail server with thousands of users mailboxes&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;a specific case of volume testing is&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;zero-volume&lt;/span&gt;&amp;nbsp;testing, where the system is fed empty tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Examples of longevity/endurance testing:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;testing a client-server application by running the client in a loop against the server over an extended period of time&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Goals of load testing:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;expose bugs that do not surface in cursory testing, such as memory management bugs, memory leaks, buffer overflows, etc.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;ensure that the application meets the performance baseline established during performance testing. This is done by running regression tests against the application at a specified maximum load.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Although performance testing and load testing can seem similar, their goals are different. On one hand, performance testing uses load testing techniques and tools for measurement and benchmarking purposes and uses various load levels. On the other hand, load testing operates at a predefined load level, usually the highest load that the system can accept while still functioning properly. Note that load testing does not aim to break the system by overwhelming it, but instead tries to keep the system constantly humming like a well-oiled machine.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
In the context of load testing, I want to emphasize the extreme importance of having large datasets available for testing. In my experience, many important bugs simply do not surface unless you deal with very large entities such thousands of users in repositories such as LDAP/NIS/Active Directory, thousands of mail server mailboxes, multi-gigabyte tables in databases, deep file/directory hierarchies on file systems, etc. Testers obviously need automated tools to generate these large data sets, but fortunately any good scripting language worth its salt will do the job.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Stress testing&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Stress testing tries to break the system under test by overwhelming its resources or by taking resources away from it (in which case it is sometimes called&amp;nbsp;&lt;span style=&quot;font-weight: bold;&quot;&gt;negative testing&lt;/span&gt;). The main purpose behind this madness is to make sure that the system fails and recovers gracefully — this quality is known as&lt;span style=&quot;font-weight: bold;&quot;&gt;recoverability&lt;/span&gt;.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
Where performance testing demands a controlled environment and repeatable measurements, stress testing joyfully induces chaos and unpredictability. To take again the example of a Web application, here are some ways in which stress can be applied to the system:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; list-style-position: outside; margin-bottom: 10px; margin-left: 15px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;double the baseline number for concurrent users/HTTP connections&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;randomly shut down and restart ports on the network switches/routers that connect the servers (via SNMP commands for example)&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;take the database offline, then restart it&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rebuild a RAID array while the system is running&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;run processes that consume resources (CPU, memory, disk, network) on the Web and database servers&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
I’m sure devious testers can enhance this list with their favorite ways of breaking systems. However, stress testing does not break the system purely for the pleasure of breaking it, but instead it allows testers to observe how the system reacts to failure. Does it save its state or does it crash suddenly? Does it just hang and freeze or does it fail gracefully? On restart, is it able to recover from the last good state? Does it print out meaningful error messages to the user, or does it merely display incomprehensible hex codes? Is the security of the system compromised because of unexpected failures? And the list goes on.&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;Conclusion&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; color: #333333; font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; line-height: 19px; margin-bottom: 0.75em; margin-top: 0.25em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
I am aware that I only scratched the surface in terms of issues, tools and techniques that deserve to be mentioned in the context of performance, load and stress testing. I personally find the topic of performance testing and tuning particularly rich and interesting, and I intend to post more articles on this subject in the future.&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2443951052805809489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/performance-vs-load-vs-stress-testing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2443951052805809489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2443951052805809489'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/performance-vs-load-vs-stress-testing.html' title='Performance vs. load vs. stress testing'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-7152181478936868758</id><published>2012-01-23T10:53:00.001+05:30</published><updated>2012-01-23T10:54:19.139+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="jmeter"/><category scheme="http://www.blogger.com/atom/ns#" term="performance testing"/><title type='text'>JMeter quick start guide.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://0.gvt0.com/ThumbnailServer2?app=vss&amp;amp;contentid=622c88eb8324fc9c&amp;amp;offsetms=5000&amp;amp;itag=w160&amp;amp;hl=en&amp;amp;sigh=__Z8jd-w9caq1l4WME11xNGuxkM5U=&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://video.google.com/s/qfmg5YyOP30/googleplayer.swf?videoUrl=http%3A%2F%2Fv20.lscache8.googlevideo.com%2Fvideoplayback%3Fid%3D622c88eb8324fc9c%26itag%3D5%26source%3Duploaded_content%26begin%3D0%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1327317812%26sparams%3Dip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%26signature%3D6563F70E30C6FE8C7A58D5BE05A4A548EBF569C5.1177ABF946D6D19D2D8F7454F92D3B65211EE2B4%26key%3Dck1&amp;thumbnailUrl=http%3A%2F%2F0.gvt0.com%2FThumbnailServer2%3Fapp%3Dvss%26contentid%3D622c88eb8324fc9c%26offsetms%3D5000%26itag%3Dw160%26hl%3Den%26sigh%3D__Z8jd-w9caq1l4WME11xNGuxkM5U%3D&amp;docid=-4883814708324445199&amp;hl=en&amp;q=JMeter%20quick%20start%20guide%20site%3Ayoutube.com&amp;speedcontrol=0&amp;source=uds&amp;playerMode=simple&quot; /&gt;

&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;

&lt;embed width=&quot;320&quot; height=&quot;266&quot;  src=&quot;http://video.google.com/s/qfmg5YyOP30/googleplayer.swf?videoUrl=http%3A%2F%2Fv20.lscache8.googlevideo.com%2Fvideoplayback%3Fid%3D622c88eb8324fc9c%26itag%3D5%26source%3Duploaded_content%26begin%3D0%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1327317812%26sparams%3Dip%2Cipbits%2Cexpire%2Cid%2Citag%2Csource%26signature%3D6563F70E30C6FE8C7A58D5BE05A4A548EBF569C5.1177ABF946D6D19D2D8F7454F92D3B65211EE2B4%26key%3Dck1&amp;thumbnailUrl=http%3A%2F%2F0.gvt0.com%2FThumbnailServer2%3Fapp%3Dvss%26contentid%3D622c88eb8324fc9c%26offsetms%3D5000%26itag%3Dw160%26hl%3Den%26sigh%3D__Z8jd-w9caq1l4WME11xNGuxkM5U%3D&amp;docid=-4883814708324445199&amp;hl=en&amp;q=JMeter%20quick%20start%20guide%20site%3Ayoutube.com&amp;speedcontrol=0&amp;source=uds&amp;playerMode=simple&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;
&lt;br /&gt;
Thanks,&lt;br /&gt;
Sumit&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/7152181478936868758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/jmeter-quick-start-guide.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/7152181478936868758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/7152181478936868758'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/jmeter-quick-start-guide.html' title='JMeter quick start guide.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-607398639511930892</id><published>2012-01-20T16:43:00.001+05:30</published><updated>2012-01-20T16:46:10.457+05:30</updated><title type='text'>Load Runner</title><content type='html'>Hi friends,&lt;br /&gt;&lt;br /&gt;If anybody wanted to learn Load runner..&lt;br /&gt;&lt;br /&gt;You can videos on &lt;a href=&quot;http://www.guru99.com/loadrunner-tutorials.html&quot;&gt;http://www.guru99.com/loadrunner-tutorials.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It will surely help.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Sumit</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/607398639511930892/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/load-runner.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/607398639511930892'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/607398639511930892'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/load-runner.html' title='Load Runner'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-726272050886361495</id><published>2012-01-20T15:22:00.000+05:30</published><updated>2012-01-20T15:22:06.191+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="webdriver"/><title type='text'>Selenium WebDriver Introduction Selenium Webdriver Tutorial Webdriver Example Selenium Training</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;320&#39; height=&#39;266&#39; src=&#39;https://www.youtube.com/embed/sU4i4DTr1HQ?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/726272050886361495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/selenium-webdriver-introduction.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/726272050886361495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/726272050886361495'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/selenium-webdriver-introduction.html' title='Selenium WebDriver Introduction Selenium Webdriver Tutorial Webdriver Example Selenium Training'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-6271900260775109237</id><published>2012-01-20T15:11:00.004+05:30</published><updated>2012-01-20T17:24:07.318+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="junit"/><category scheme="http://www.blogger.com/atom/ns#" term="selenium"/><title type='text'>TestNg and Selenium RC Junit ANT Selenium Training Frameworks</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; src=&quot;http://0.gvt0.com/vi/SdE7e7PaV-Q/0.jpg&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/SdE7e7PaV-Q&amp;amp;fs=1&amp;amp;source=uds&quot;&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/SdE7e7PaV-Q&amp;amp;fs=1&amp;amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot; height=&quot;500&quot; width=&quot;500&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/6271900260775109237/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/testng-and-selenium-rc-junit-ant.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/6271900260775109237'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/6271900260775109237'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/testng-and-selenium-rc-junit-ant.html' title='TestNg and Selenium RC Junit ANT Selenium Training Frameworks'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-6143617615496771622</id><published>2012-01-20T15:05:00.002+05:30</published><updated>2012-01-20T17:26:11.583+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="junit"/><category scheme="http://www.blogger.com/atom/ns#" term="selenium"/><title type='text'>Junit Tutorials</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Hi Friends,&lt;br /&gt;&lt;br /&gt;I have come across 1 good video: having details about how to use Junit in eclipse for selenium.&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; src=&quot;http://2.gvt0.com/vi/KAmII54wpAY/0.jpg&quot; style=&quot;clear: left; float: left;&quot; height=&quot;266&quot; width=&quot;320&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/KAmII54wpAY&amp;amp;fs=1&amp;amp;source=uds&quot;&gt;&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/KAmII54wpAY&amp;amp;fs=1&amp;amp;source=uds&quot; type=&quot;application/x-shockwave-flash&quot; height=&quot;500&quot; width=&quot;500&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt; Sumit</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/6143617615496771622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/junit-tutorials.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/6143617615496771622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/6143617615496771622'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/junit-tutorials.html' title='Junit Tutorials'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-9203956259355606903</id><published>2012-01-20T13:34:00.000+05:30</published><updated>2012-01-20T15:53:34.536+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="testng"/><title type='text'>How to Capture Screenshot with TestNG.</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
I have found one blog which will go through all the process how to capture screenshot with TestNG. &lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://bharath-marrivada.blogspot.com/2011/04/selenium-screenshot-testng-capture.html&quot;&gt;http://bharath-marrivada.blogspot.com/2011/04/selenium-screenshot-testng-capture.html&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/9203956259355606903/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/how-to-capture-screenshot-with-testng.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/9203956259355606903'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/9203956259355606903'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/how-to-capture-screenshot-with-testng.html' title='How to Capture Screenshot with TestNG.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-2623053044397062154</id><published>2012-01-20T13:15:00.000+05:30</published><updated>2012-01-20T13:18:05.536+05:30</updated><title type='text'>Tips on Selenium RC.</title><content type='html'>&lt;p style=&quot;margin-top: 0.25em; margin-right: 0px; margin-bottom: 0.75em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 19px; color: rgb(51, 51, 51); font-family: &#39;Segoe UI&#39;, Calibri, &#39;Myriad Pro&#39;, Myriad, &#39;Trebuchet MS&#39;, Helvetica, Arial, sans-serif; font-size: 13px; text-align: -webkit-auto; background-color: rgb(255, 255, 255); &quot;&gt;&lt;/p&gt;&lt;span&gt;&lt;span&gt;1. To run the Java client you need to only have selenium-java-client-driver.jar (located in selenium-remote-control-1.0-beta-1/selenium-java-client-driver-1.0-beta-1 ) in your classpath.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;2. The automatically generated java file (from Selenium Core) is likely to be defective. Ensure at least you have the following import statements:import com.thoughtworks.selenium.*;&lt;br /&gt;import junit.framework.*;&lt;br /&gt;import java.util.regex.Pattern;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;3. Ensure that the saved file name matches the generated class file name&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;.4. Remove the package statement or replace it with your own package statement. Initially just remove it.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;span&gt;5. Error: java.lang.UnsupportedOperationException: Catch body broken: IOException from cmd=setContext&amp;amp;1=SeleniumSTSanityTest.testSimpleThoughts -&amp;gt; java.net.ConnectException: Connection refusedHave you run the Selenium server?&lt;br /&gt;Run the Selenium server like this:&lt;br /&gt;java -jar selenium-server.jarThe selenium server is located in:&lt;br /&gt;selenium-remote-control-1.0-beta-1/selenium-server-1.0-beta-16. Error: com.thoughtworks.selenium.SeleniumException: ERROR Server Exception: sessionId should not be null; has this session been started yet?Ensure that the browser is in the PATH before running the server. On my linux box I did:&lt;br /&gt;export PATH=$PATH:/usr/lib/firefox-2.0.0.6/7. Error: com.thoughtworks.selenium.SeleniumException: Permission denied to get property Location.hrefThis happens on Firefox when a previous page wasn’t fully loaded before the next page was invoked (due to timeout or click() was used). The solution is to use *chrome instead of *firefox in setup. I use for firefox:&lt;br /&gt;setUp(“http://blog.taragana.com/”, “*chrome”);8. Timeout error&lt;br /&gt;Increase the time in selenium.waitForPageToLoad() to 60000 (1 minute) or more.9. How to run the generated java Test file?&lt;br /&gt;This is really a JUnit question but in short you can add the following code in the generated file to get it running:public static Test suite() {&lt;br /&gt;return new TestSuite(SeleniumSTSanityTest.class);&lt;br /&gt;}public static void main(String args[]) {&lt;br /&gt;junit.textui.TestRunner.run(suite());&lt;br /&gt;}&lt;br /&gt;Note: Replace SeleniumSTSanityTest with the name of your Java source file (without the .java extension)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/2623053044397062154/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/tips-on-selenium-rc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2623053044397062154'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/2623053044397062154'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2012/01/tips-on-selenium-rc.html' title='Tips on Selenium RC.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1479587947502358548.post-4406309663772232167</id><published>2009-08-18T13:47:00.000+05:30</published><updated>2009-08-18T13:50:01.283+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="MISC NEWS"/><title type='text'></title><content type='html'>&lt;p align=&quot;center&quot;&gt;&lt;a href=&quot;http://cyberdimensions.blogspot.com/2009/08/h1n1-influenza-symptoms-precautions.html&quot;&gt;&lt;span style=&quot;font-size:180%;color:#cc0000;&quot;&gt;H1N1 Influenza A: Symptoms &amp;amp; Precautions&lt;/span&gt;&lt;/a&gt; &lt;/p&gt;&lt;p align=&quot;center&quot;&gt;Although I am deviating from scope of my Blog , but I believe since my blog is read by many of my freinds I wish to share Some info regarding H1N1. &lt;/p&gt;&lt;p align=&quot;center&quot;&gt;Measures to consider, particularly when you are in an area where flu is rampant in the community:&lt;br /&gt;Maintain good personal hygiene. Wash your hands frequently. Carry a hand sanitizer for use when soap and water aren&#39;t readily available&lt;br /&gt;Avoid touching your face.&lt;br /&gt;Avoid people who seem to be sick.&lt;br /&gt;Avoid crowds as much as possible.&lt;br /&gt;If you cannot avoid crowds, consider wearing a face mask or a respirator (if you are trained in using a respirator).&lt;br /&gt;Monitor your health, and seek medical attention if you feel unwell.&lt;br /&gt;To reduce the spread of flu:&lt;br /&gt;Cover coughs and sneezes with a mask or a tissue.&lt;br /&gt;Stay at home if you are unwell.&lt;br /&gt;Limit your contact with others as much as possible.&lt;br /&gt;Contact the Doctor or the Nodal Center nearest to your location, if you or your children develop flu-like symptoms.&lt;br /&gt;When you arrive at the hospital, ensure that you tell them that you have recently been in an area that has reported H1N1 influenza.&lt;br /&gt;The symptoms of H1N1 swine flu in people are similar to the symptoms of regular human flu and include fever, cough, sore throat, body aches, headache, chills and fatigue. Some people have reported diarrhoea and vomiting associated with H1N1 swine flu. Severe illness (pneumonia and respiratory failure) and even deaths have been reported with H1N1 swine flu infection. Like seasonal flu, H1N1 swine flu may cause a worsening of underlying chronic diseases.In adults, emergency warning signs that need urgent medical attention include:&lt;br /&gt;Difficulty in breathing or shortness of breath&lt;br /&gt;Pain or pressure in the chest or abdomen&lt;br /&gt;Sudden dizziness&lt;br /&gt;Confusion&lt;br /&gt;Severe or persistent vomiting&lt;br /&gt;Flu-like symptoms improve but then return with fever and worse cough&lt;br /&gt;You can refer these links for more Information :&lt;br /&gt;&lt;a href=&quot;http://mohfw.nic.in/SWINEFLU.htm&quot; target=&quot;_blank&quot;&gt;Govt of India - Ministry of Health website on H1N1 guidelines and information&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.who.int/csr/disease/swineflu/en/index.html&quot; target=&quot;_blank&quot;&gt;WHO website on H1N1 Infleunza&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.cdc.gov/h1n1flu/business&quot; target=&quot;_blank&quot;&gt;Centers for Disease Control and Prevention&lt;/a&gt; &lt;a href=&quot;http://www.cdc.gov/h1n1flu/business&quot; target=&quot;_blank&quot;&gt;website&lt;/a&gt;&lt;br /&gt;&lt;a href=&quot;http://www.niv.co.in/swine_flu_links.htm&quot; target=&quot;_blank&quot;&gt;National Institute of Virology website&lt;/a&gt;&lt;br /&gt;if you are visiting an infected area use N95 Masks.These are 3 tier masks that are much better than 1 tier masks that are avilable @ a cheaper rate in the Market.&lt;br /&gt;&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sumitbit2005.blogspot.com/feeds/4406309663772232167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://sumitbit2005.blogspot.com/2009/08/h1n1-influenza-symptoms-precautions.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/4406309663772232167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1479587947502358548/posts/default/4406309663772232167'/><link rel='alternate' type='text/html' href='http://sumitbit2005.blogspot.com/2009/08/h1n1-influenza-symptoms-precautions.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/14755785037527896105</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>