<?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-3329749476743375090</id><updated>2024-10-24T22:49:23.702+05:30</updated><category term="Selenium IDE"/><category term="Selenium"/><category term="WebDriver"/><category term="Software Testing"/><category term="Android"/><category term="File Download"/><category term="File Upload"/><category term="Java"/><category term="Javascripts"/><category term="Mouse Hover"/><category term="POM"/><category term="QTP"/><title type='text'>Radical-QA</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></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-3329749476743375090.post-2926097813986964511</id><published>2015-09-08T17:58:00.000+05:30</published><updated>2015-09-08T17:58:34.202+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>Java Essentials for a good Selenium Automation Tester</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;To become
good selenium automation tester, you must be proficient with some concepts of
java.&lt;br /&gt;
If you’re then you can write excellent code with selenium and java.&lt;br /&gt;
&lt;br /&gt;
Below I have listed those java concepts which selenium tester must be
proficient.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;OOP’s concept&lt;/b&gt; - Class, Objects Polymorphism, Inheritance and
Encapsulation.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Java Programming essentials&lt;/b&gt; - Object Instances, method
overloading/overriding concepts and packages.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Looping statements&lt;/b&gt; – This will help us in scenarios like, iterating
through a large table to find a record that you want and Running the same test
for multiple numbers of times.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Control Statements&lt;/b&gt; – While, do-While, Switch, if statements – This will
help us in writing the scripts for a multiple scenario statements and decision
making scenarios.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Arrays Concepts&lt;/b&gt; – This will help us in having some set of data of same
type in a static way.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;Java Collections Framework&lt;/b&gt; – ArrayLists.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 14.0pt;&quot;&gt;&lt;br /&gt;
&lt;b&gt;File Streams&lt;/b&gt; – This will be helpful in externalization of data through
CSV, Excel or Java Properties file.&lt;br /&gt;
&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;br style=&quot;mso-special-character: line-break;&quot; /&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/2926097813986964511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/java-essentials-for-good-selenium_8.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/2926097813986964511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/2926097813986964511'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/java-essentials-for-good-selenium_8.html' title='Java Essentials for a good Selenium Automation Tester'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-9114471701579043083</id><published>2015-09-08T17:32:00.000+05:30</published><updated>2015-09-08T17:32:37.950+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="POM"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>Page Object Model (POM)</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;This is widely used concept in the world on selenium
webdriver also known as POM.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;With the use of POM, we can increase readability of code also
it is easy to maintain and user can reuse it.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Basically POM is design pattern to
create object repository (OR).&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;In POM, we are maintaining different
pages for different web pages. This page class&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; contains &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;Elements along with page methods which perform
operation on web element.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;The main advantage of Page Object Model is that if the UI
changes for any page, it don’t require us to change any tests, we just need to
change only the code within the page objects.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Below I have given example of POM&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;

&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;//Class for page objects (elements)&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public PageName(WebDriver driver)&amp;nbsp; 
&amp;nbsp;{&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.driver = driver;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //This initElements method will create all WebElements&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; //PageFactory.initElements(driver, this);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PageFactory.initElements(new AjaxElementLocatorFactory(driver,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Constants.WebDriverWaitDuration), this);&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;/*&amp;nbsp; 
&amp;nbsp; * All WebElements are identified by @FindBy annotation&amp;nbsp; 
&amp;nbsp; * @FindBy can accept tagName, partialLinkText, name, linkText, id, css, className, xpath as&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; * attributes.&amp;nbsp; 
&amp;nbsp; */&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;Say we have text box&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;@FindBy(Locator=&quot;LocatorValue&quot;)&amp;nbsp; 
&amp;nbsp;public WebElement NameForElement;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;//Method to enter input&amp;nbsp; 
&amp;nbsp;public void EnterInput(String text)&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NameForElement.clear();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NameForElement.sendKeys(text);&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;//If Element is button&amp;nbsp; 
&amp;nbsp;public void ClickOnButton()&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; NameForElement.click();&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;//If Element is drop-down&amp;nbsp; 
&amp;nbsp;public void SelectValueFromDropDown(String visibletext)&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; new Select(NameForElement).selectByVisibleText(visibletext);&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Lets consider two different cases of writing code as
below, in case 1&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;there no use of POM
concept and in case 2 I have used POM&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;

&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Case 1&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;Without POM&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; driver.findElement(By.id(&quot;username&quot;)).sendKeys(&quot;testuser&quot;);&amp;nbsp; 
&amp;nbsp;driver.findElement(By.id(&quot;password&quot;)).sendKeys(&quot;testuser&quot;);&amp;nbsp; 
&amp;nbsp;driver.findElement(By.id(&quot;signIn&quot;)).click();&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Case 2&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;With POM&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Say we are working with login and elements resides in loginpage&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Code will look like below – &lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;

&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; loginpage. EnterUserName(“testuser”);&amp;nbsp; 
&amp;nbsp;loginpage. EnterPassword(“testuser”);&amp;nbsp; 
&amp;nbsp;loginpage. ClickOnLoginButton();&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;So suppose I have used login code in 10 classes as per
case 1, and if there is change in locator value. In that case I have to make
changes in all 10 classes but if code is written as per case 2, I have to make
changes at one place only where all elements are resides.&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;b&gt;

&lt;/b&gt;&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Below I have tried to list out some benefits of POM&lt;/span&gt;&lt;/b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;b&gt;

&lt;/b&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ol start=&quot;1&quot; style=&quot;margin-top: 0cm;&quot; type=&quot;1&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Code is more readable and
     robust.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Avoid duplication of code.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Improves the maintainability
     of tests (Useful in Agile methodology based projects).&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Simple and clear tests.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Good support of tests,
     because everything is stored in one place.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;The UI changes, the fix need
     only be applied in one place.&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Code re-use: Able to use the
     same page object in a variety of tests cases.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&amp;nbsp; &lt;/span&gt;&lt;br /&gt;


&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/9114471701579043083/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/page-object-model-pom.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/9114471701579043083'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/9114471701579043083'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/page-object-model-pom.html' title='Page Object Model (POM)'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-8547109190678678266</id><published>2015-09-08T17:02:00.000+05:30</published><updated>2015-09-08T17:32:25.466+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mouse Hover"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>Mouse Hover functionality with selenium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Handling Mouse hover is one of the complex events for
Selenium Users&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;We can not handle Mouse Hover directly by any command; we
have to use some javascript to help us in mouse hover.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;In this post I have created a method which will help
selenium users to handle mouse hover event.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;You can easily call that method into your script logic.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public void MouseHover(String locatorvalue ) throws InterruptedException&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Actions action = new Actions(driver);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebElement element = driver.findElement(By.id(locatorvalue));&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; action.moveToElement(element).build().perform();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.sleep(5000);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String javaScript = &quot;var evObj = document.createEvent(&#39;MouseEvents&#39;);&quot; +&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;evObj.initMouseEvent(\&quot;mouseover\&quot;,true, false, window, 0, 0, 0, 0, 0, false, false,&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; false, false, 0, null);&quot; +&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;arguments[0].dispatchEvent(evObj);&quot;;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WebElement element1 = driver.findElement(By.id(locatorvalue));&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ((JavascriptExecutor)driver).executeScript(javaScript, element1);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thread.sleep(5000);&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;You can call this method as&lt;/span&gt;&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;

&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin-left: 18.0pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; MouseHover(locator value );&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/8547109190678678266/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/mouse-hover-functionality-with-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8547109190678678266'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8547109190678678266'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/mouse-hover-functionality-with-selenium.html' title='Mouse Hover functionality with selenium'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-4024556528563403147</id><published>2015-09-08T16:32:00.000+05:30</published><updated>2015-09-08T16:32:30.367+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="File Download"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>File download with Selenium WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Most of
the selenium user is facing problem while handling file download scenario.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;In file downloading
we have to deal with windows pop-up also we need to verify whether file is
downloaded or not.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;To deal
with this scenario with have to work with firefox profile.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;Below you
can check the code, here you can verify file by its name or if name is randomly
generated then you can verify file by its extension.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; @BeforeClass&amp;nbsp; 
&amp;nbsp;public void Setup() throws Exception&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;driver = new FirefoxDriver(ffprofile());&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;File directory = new File(FIleDownloadPath);&amp;nbsp; 
&amp;nbsp;delete(directory); //create a function delete with code to delete directory and its files&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;//Method
where user will download a file and then verify&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; @Test&amp;nbsp; 
&amp;nbsp;public void DownloadAndVerify()&amp;nbsp;&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.get(URL);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;//Go to the place where link / button is placed for download&amp;nbsp; 
&amp;nbsp;// Click on it to download file&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;Assert.assertTrue(VerifyFileDownloadWithName (FIleDownloadPath, &quot;Name of file with extension&quot;), &quot;Failed to download Expected document&quot;);&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;//if file name is random then you can verify by extension&amp;nbsp; 
&amp;nbsp;Assert.assertTrue(VerifyFileDownloadWithExtension (FIleDownloadPath, &quot;.extension of file&quot;), &quot;Failed to download document which has extension &quot;.extension of file &quot;);&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;//To set
download functionality, with this download pop-up will not appeared&lt;/span&gt;&lt;/div&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public static FirefoxProfile ffprofile() throws Exception&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; FirefoxProfile firefoxProfile = new FirefoxProfile();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firefoxProfile.setPreference(&quot;browser.download.folderList&quot;,2);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firefoxProfile.setPreference(&quot;browser.download.manager.showWhenStarting&quot;,false);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firefoxProfile.setPreference(&quot;browser.download.dir&quot;,downloadPath);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; firefoxProfile.setPreference &quot;browser.helperApps.neverAsk.saveToDisk&quot;,&amp;nbsp; 
&amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;text/csv,application/x-msexcel,application/excel,application/x-excel,&quot; +&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;application/vnd.ms-excel,image/png,image/jpeg,text/html,text/plain,application/&quot; +&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &quot;msword,application/xml&quot;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return firefoxProfile;&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;//Verify
file downloaded by its Name&lt;/span&gt;&lt;/div&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public boolean VerifyFileDownloadWithName (String FIleDownloadPath, String fileName)&amp;nbsp;&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; boolean flag = false;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File dir = new File(FIleDownloadPath);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File[] dir_contents = dir.listFiles();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int i = 0; i &amp;lt; dir_contents.length; i++)&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (dir_contents[i].getName().equals(fileName))&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return flag=true;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return flag;&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;//Verify
file downloaded by its Extension&lt;/span&gt;&lt;/div&gt;
&amp;nbsp;&lt;br /&gt;
&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; private boolean VerifyFileDownloadWithExtension(String FIleDownloadPath, String ext)&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp; boolean flag=false;&amp;nbsp; 
&amp;nbsp; File dir = new File(FIleDownloadPath);&amp;nbsp; 
&amp;nbsp; File[] files = dir.listFiles();&amp;nbsp; 
&amp;nbsp; if (files == null || files.length == 0)&amp;nbsp;&amp;nbsp; 
&amp;nbsp; {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag = false;&amp;nbsp; 
&amp;nbsp; }&amp;nbsp; 
&amp;nbsp; for (int i = 1; i &amp;lt; files.length; i++)&amp;nbsp;&amp;nbsp; 
&amp;nbsp; {&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(files[i].getName().contains(ext))&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; flag=true;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; 
&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp; return flag;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 11.0pt;&quot;&gt;With this
code, hope you are set to handle Download Functionality.&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/4024556528563403147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/file-download-with-selenium-webdriver.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/4024556528563403147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/4024556528563403147'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/file-download-with-selenium-webdriver.html' title='File download with Selenium WebDriver'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-3690447914798586813</id><published>2015-09-03T18:57:00.001+05:30</published><updated>2015-09-03T18:59:42.786+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="File Upload"/><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>File upload – Selenium WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;h4 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;There are different ways to upload file, below you can see code for same. &lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;h4 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;File upload
using sendKeys&lt;/span&gt;&lt;/b&gt;&lt;/h4&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;If&amp;nbsp;&amp;nbsp; &lt;b&gt;input&amp;nbsp;type=&quot;file&quot;&lt;/b&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;is used the you can upload
file using &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;sendKeys&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Suppose “FileUpload.txt”
is file you want to upload, and say file is under your project only&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; File file = new File(&quot;FileUpload.txt &quot;);&amp;nbsp; 
&amp;nbsp;WebElement upload = driver.findElement(By.locator(LocatorValue));&amp;nbsp; 
&amp;nbsp;upload.sendKeys(file.getAbsolutePath());&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;File
upload using Robot&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;You can
upload file using robot framework as below&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; File file = new File(&quot;FileUpload.txt&quot;);&amp;nbsp; 
&amp;nbsp;WebElement upload = driver.findElement(By.locator(LocatorValue));&amp;nbsp; 
&amp;nbsp;upload.click();&amp;nbsp; 
&amp;nbsp;StringSelection filepath = new StringSelection(file.getAbsolutePath());&amp;nbsp; 
&amp;nbsp;Toolkit.getDefaultToolkit().getSystemClipboard().setContents(filepath, null);&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;//imitate mouse events like ENTER, CTRL+C, CTRL+V&amp;nbsp; 
&amp;nbsp;Robot robot = new Robot();&amp;nbsp; 
&amp;nbsp;robot.delay(1000);&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
&amp;nbsp;robot.keyPress(KeyEvent.VK_CONTROL);&amp;nbsp; 
&amp;nbsp;robot.keyPress(KeyEvent.VK_V);&amp;nbsp; 
&amp;nbsp;robot.keyRelease(KeyEvent.VK_V);&amp;nbsp; 
&amp;nbsp;robot.keyRelease(KeyEvent.VK_CONTROL);&amp;nbsp; 
&amp;nbsp;robot.keyPress(KeyEvent.VK_ENTER);&amp;nbsp; 
&amp;nbsp;robot.keyRelease(KeyEvent.VK_ENTER);&amp;nbsp; 
&amp;nbsp;robot.delay(1000);&amp;nbsp; 
&amp;nbsp;&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;h4 style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;You can also upload file
using AutoIT tool&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;/span&gt;&lt;/h4&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;

&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/3690447914798586813/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/file-upload-selenium-webdriver.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3690447914798586813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3690447914798586813'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/file-upload-selenium-webdriver.html' title='File upload – Selenium WebDriver'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-5827008981381136525</id><published>2015-09-02T17:34:00.000+05:30</published><updated>2015-09-03T18:59:20.628+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'>Handling multiple windows with Selenium WebDriver</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;h4 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;With the
help of below code you can easily handle different windows and can perform
different operations&lt;/span&gt;&lt;/h4&gt;
&lt;h4 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;pre nbsp=&quot;&quot; style=&quot;background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Store current window handle &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String winHandleBefore = driver.getWindowHandle(); &amp;nbsp;
&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Click on element which opens new window &amp;nbsp;
&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Switch to new window opened &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (String winHandle : driver.getWindowHandles()) &amp;nbsp;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; { &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.switchTo().window(winHandle); &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // perform operation that opens new window &amp;nbsp;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Close the new window &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.close(); &amp;nbsp;
&amp;nbsp; &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Switch back to original window &amp;nbsp;
&amp;nbsp;&amp;nbsp;&amp;nbsp; driver.switchTo().window(winHandleBefore); &amp;nbsp;
&amp;nbsp; &amp;nbsp;&lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/h4&gt;
&lt;h4 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h4&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/5827008981381136525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/handling-multiple-windows-with-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/5827008981381136525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/5827008981381136525'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/handling-multiple-windows-with-selenium.html' title='Handling multiple windows with Selenium WebDriver'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-8249187062443169148</id><published>2015-09-02T17:07:00.002+05:30</published><updated>2015-09-03T18:59:53.519+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Javascripts"/><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 and Javascripts alerts/ pop-ups</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;

&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Generally JavaScript pop-ups are generated by web
application and hence they can be easily controlled by the browser.&lt;span style=&quot;mso-tab-count: 1;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Built into Selenium is the ability to switch to an
alert window and either accept or dismiss it.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Below are the ways to accept / dismiss alert&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;// Here
you can accept the alert and can get text of alert&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String AcceptAlertAndGetText()&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Switch to alert&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert alert = driver.switchTo().alert();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get text of the alert&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String AlertText = alert.getText();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Accept the alert&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert.accept();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return AlertText;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: #f3f3f3;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;//Here
you can dismiss the alert and can get text of alert&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;mso-layout-grid-align: none; text-autospace: none;&quot;&gt;
&lt;span style=&quot;color: black; font-family: Calibri; mso-bidi-font-family: Consolas;&quot;&gt;&lt;pre nbsp=&quot;&quot; style=&quot;background-image: URL(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqZMrDDXYBWzjKwQfIo7-7reVKgGLYMgXrmcnf_SeTirwsA0fbjtd5LjfF6mvK_oZcS2GL0nRTEs6IhOLCo6PCqqeUt7npehUR0n82_kgvANsufj9GTMMMa1rCa4pCDQqqimqS97ei2lcK/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;&quot;&gt;&lt;code style=&quot;color: black; word-wrap: normal;&quot;&gt; public String DismisAlertAndGetText()&amp;nbsp; 
&amp;nbsp;{&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Switch to alert&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Alert alert = driver.switchTo().alert();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Get text of the alert&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String AlertText = alert.getText();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //Dismiss the alert&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert.dismiss();&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return AlertText;&amp;nbsp; 
&amp;nbsp;}&amp;nbsp; &lt;/code&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/8249187062443169148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/selenium-webdriver-and-javascripts.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8249187062443169148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8249187062443169148'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/selenium-webdriver-and-javascripts.html' title='Selenium WebDriver and Javascripts alerts/ pop-ups'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-5224690541137713565</id><published>2015-09-02T15:33:00.000+05:30</published><updated>2015-09-03T18:59:20.623+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'>CSS Selectors for Selenium with example</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;br /&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;br /&gt;
&lt;h2 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;This post
is all about CSS selectors for selenium. CSS is faster and simpler than Xpath
particularly in case of IE browser where Xpath works very slowly.&lt;/span&gt;&lt;/h2&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 class=&quot;MsoNormal&quot; style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;We can
detect element in different ways as below&lt;/span&gt;&lt;/h3&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:WordDocument&gt;
  &lt;w:View&gt;Normal&lt;/w:View&gt;
  &lt;w:Zoom&gt;0&lt;/w:Zoom&gt;
  &lt;w:PunctuationKerning/&gt;
  &lt;w:ValidateAgainstSchemas/&gt;
  &lt;w:SaveIfXMLInvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;
  &lt;w:IgnoreMixedContent&gt;false&lt;/w:IgnoreMixedContent&gt;
  &lt;w:AlwaysShowPlaceholderText&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;
  &lt;w:Compatibility&gt;
   &lt;w:BreakWrappedTables/&gt;
   &lt;w:SnapToGridInCell/&gt;
   &lt;w:WrapTextWithPunct/&gt;
   &lt;w:UseAsianBreakRules/&gt;
   &lt;w:DontGrowAutofit/&gt;
  &lt;/w:Compatibility&gt;
  &lt;w:BrowserLevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;
 &lt;/w:WordDocument&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;!--[if gte mso 9]&gt;&lt;xml&gt;
 &lt;w:LatentStyles DefLockedState=&quot;false&quot; LatentStyleCount=&quot;156&quot;&gt;
 &lt;/w:LatentStyles&gt;
&lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt;
&lt;style&gt;
 /* Style Definitions */
 table.MsoNormalTable
 {mso-style-name:&quot;Table Normal&quot;;
 mso-tstyle-rowband-size:0;
 mso-tstyle-colband-size:0;
 mso-style-noshow:yes;
 mso-style-parent:&quot;&quot;;
 mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
 mso-para-margin:0cm;
 mso-para-margin-bottom:.0001pt;
 mso-pagination:widow-orphan;
 font-size:10.0pt;
 font-family:&quot;Times New Roman&quot;;
 mso-ansi-language:#0400;
 mso-fareast-language:#0400;
 mso-bidi-language:#0400;}
&lt;/style&gt;
&lt;![endif]--&gt;

&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;# Element
by ID&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Event is
ID&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;css=#Event&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;# Element
by Name&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Query is
name&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;css=input[name=
Query]&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;# Element
by Class&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Example
is class&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span class=&quot;apple-style-span&quot;&gt;&lt;span style=&quot;color: #333333; font-family: &amp;quot;Courier New&amp;quot;; font-size: 10.5pt;&quot;&gt;css=.Example a&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;# Element
by href&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;css=a[href=’URL’]&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;# Locating
Child or subchild&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Here a is
child of div&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;css= div
a&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;# Next sibling
by + sign&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Say
Registration is ID and small is next sibling&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;#Registration
+ small&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;#Element
name start with go&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;input[name^=&quot;go&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;#Element
name end with go&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;input[name$=&quot;go&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;#Matching
by inner text&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Search is
inner text&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;css=a:contains(&#39;Search&#39;)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;&amp;nbsp;&lt;/span&gt;#&lt;b&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Choosing
specific element&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;margin-top: 0cm;&quot; type=&quot;disc&quot;&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Automation Tools&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;QTP&lt;/span&gt;&lt;/li&gt;
&lt;li class=&quot;MsoNormal&quot; style=&quot;mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;&quot;&gt;&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;Selenium&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;If we
want to select the second li element (Selenium) in this list, we can use the
nth-of-type, which will find the fourth li in the list.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;span style=&quot;font-family: Calibri; font-size: 10.5pt;&quot;&gt;css=ul#recordlist
li:nth-of-type(2)&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;

&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/5224690541137713565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2015/09/css-selectors-for-selenium-with-example.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/5224690541137713565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/5224690541137713565'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2015/09/css-selectors-for-selenium-with-example.html' title='CSS Selectors for Selenium with example'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-496572841078682169</id><published>2013-10-10T13:25:00.001+05:30</published><updated>2013-10-24T16:10:20.392+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="WebDriver"/><title type='text'>WebDriver TestNG Parameterization with DataProvider</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;margin-bottom: 0in;&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For&amp;nbsp;Parameterization&amp;nbsp;in WebDriver, you can have different way..&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I have listed 2 ways with TestNG + DataProvider&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You can take input from xls and store it in DataProvider and then you can pass that to your test.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In other case, you can directly put the data in&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;DataProvider, and can access them. You can find the details below...&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;1)Take Input From Excel&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public class TS_Login&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;WebDriver driver = new FirefoxDriver();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;@Test(priority=1)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public void testing()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.get(&quot;URL of the website&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;@Test(dataProvider=&quot;login&quot;, priority=2)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public void TS1_LoginFunctionality(String Email,String Pass)throws Exception&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.get(&quot;Sign In URL&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-link&quot;)).click();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-email&quot;)).sendKeys(Email);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-pw&quot;)).sendKeys(Pass);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-submit&quot;)).click();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;@DataProvider&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public Object[][] login() throws Exception&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;Object[][] testObjArray = getTableArray(&quot;Path Of Excel File&quot;,&quot;Sheet1&quot;,&quot;&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;return (testObjArray);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;//Get the data from excel and store in Array&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public static Object[][] getTableArray(String xlFilePath, String sheetName, String tableName) &amp;nbsp; &amp;nbsp;throws Exception&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;{ &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String[][] tabArray = null;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Workbook workbook = Workbook.getWorkbook(new File(xlFilePath));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Sheet sheet = workbook.getSheet(sheetName);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int ci,cj, totalRows = 0, totalCols = &amp;nbsp;0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; totalRows = sheet.getRows();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; totalCols = sheet.getColumns();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;total cols = &quot; + totalCols);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(&quot;total rows = &quot; + totalRows);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabArray=new String[totalRows][totalCols];&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ci=0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;for (int i=1;i (less than) totalRows;i++,ci++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;cj=0;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;for (int j=0;j&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;(less than)&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;totalCols;j++, cj++)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tabArray[ci][cj]=sheet.getCell(j,i).getContents();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.out.println(tabArray[ci][cj]);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (FileNotFoundException e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Could not read the Excel sheet&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e.printStackTrace();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;catch (IOException e)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;Could not read the Excel sheet&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e.printStackTrace();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return(tabArray);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #bf9000;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Note : Please replace&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;(less than) with&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;&amp;lt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;b&gt;2)Input with DataProvider&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public class dataprovider {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;WebDriver driver = new FirefoxDriver();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;@Test(priority=1)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public void testing()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.get(&quot;URL of the website&quot;);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;@Test(dataProvider = &quot;excelData&quot;, priority = 2)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public void executeTest(String name, String numbn) throws InterruptedException&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-link&quot;)).click();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-email&quot;)).sendKeys(name);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-pw&quot;)).sendKeys(numbn);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;driver.findElement(By.id(&quot;signin-submit&quot;)).click();&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;@DataProvider(name = &quot;excelData&quot;)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;public Object[][] data(){&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;return new Object[][]{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&quot;Test&quot;,&quot;asd&quot;},&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&quot;More Testing&quot;,&quot;asd&quot;},&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{&quot;Last Test&quot;,&quot;asd&quot;}};&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/496572841078682169/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2013/10/webdriver-testng-parametrization-with.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/496572841078682169'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/496572841078682169'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2013/10/webdriver-testng-parametrization-with.html' title='WebDriver TestNG Parameterization with DataProvider'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-1569394635538414481</id><published>2013-07-18T14:54:00.000+05:30</published><updated>2013-07-18T14:55:34.295+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><title type='text'></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: left;&quot;&gt;
Start Selenium RC Server Within Code.&lt;/h2&gt;
&lt;br /&gt;
Now there is no need to start selenium server by going to command prompt and calling to server.&lt;br /&gt;
&lt;br /&gt;
You can directly start the server in your script itself.&lt;br /&gt;
You just need to import&lt;br /&gt;
import org.openqa.selenium.server.RemoteControlConfiguration;&lt;br /&gt;
import org.openqa.selenium.server.SeleniumServer;&lt;br /&gt;
&lt;br /&gt;
The code will look like -&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import org.openqa.selenium.server.RemoteControlConfiguration;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;import org.openqa.selenium.server.SeleniumServer;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;public class tet extends SeleneseTestCase {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;private Selenium selenium;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public SeleniumServer seleniumserver;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;@Before&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;public void setUp() throws Exception {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;RemoteControlConfiguration rc = new RemoteControlConfiguration();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;seleniumserver = new SeleniumServer(rc);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;selenium = new DefaultSelenium(&quot;localhost&quot;, 4444, &quot;*chrome&quot;, &quot;https://www.google.co.in/&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;seleniumserver.start();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;selenium.start();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #3d85c6;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/1569394635538414481/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2013/07/start-selenium-rc-server-withing-code.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/1569394635538414481'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/1569394635538414481'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2013/07/start-selenium-rc-server-withing-code.html' title=''/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-5423640425093557096</id><published>2013-06-11T12:10:00.001+05:30</published><updated>2013-06-14T15:34:46.927+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Android App : Automtion Testing Tools - Part II</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 id=&quot;AndroidApp-AutomationTestingTools-Descriptions&quot;&gt;
Descriptions&lt;/h1&gt;
Below we have listed different tools with their advantages and disadvantages.&lt;br /&gt;
&lt;h2 id=&quot;AndroidApp-AutomationTestingTools-Monkey&quot;&gt;
Monkey&lt;/h2&gt;
Monket
 tool is designed to simulate this situation. The Monkey tool, a part of
 the Android SDK, sends a stream of random user events. Command line 
parameters specify the number of user actions, the ratio of each event 
type, and a name of a package.&lt;br /&gt;
&lt;strong&gt;Advantages&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Monkey tool is zero maintenance costs.&lt;/li&gt;
&lt;li&gt;Stress testing can detect non-trivial bugs.&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Monkey can’t simulate complex workloads such as authentication. In such cases, application functionality remains untested.&lt;/li&gt;
&lt;li&gt;Games
 with complex control that require quick reactions and complex gestures 
will be completed at the beginning, or do not begin.&lt;/li&gt;
&lt;li&gt;It’s very difficult to reproduce errors found by Monkey.&lt;/li&gt;
&lt;li&gt;Monkey doesn’t check application status during the test.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;AndroidApp-AutomationTestingTools-MonkeyRunner&quot;&gt;
MonkeyRunner&lt;/h2&gt;
&lt;br /&gt;
You
 can not only develop Android device control scripts using MonkeyRunner,
 you can also write scripts to test the application on a specific 
device. Its like record and play back tool.&lt;br /&gt;
&lt;strong&gt;Advantage&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Flexible&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The complexity of writing scripts, even in simple cases.&lt;/li&gt;
&lt;li&gt;Developing
 monkeyrunner scripts takes a lot of time, so this method is usually not
 justified. However, in special cases, this method might work.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;AndroidApp-AutomationTestingTools-Robotium&quot;&gt;
Robotium&lt;/h2&gt;
Robotium is not a part of Android SDK, and it’s distributed under the Open Source license.&lt;br /&gt;
Robotium scripts define actions on the application UI level rather than the input device level.&lt;br /&gt;
For
 example, a script needs to tap on an «OK» button. The monkeyrunner 
script will be implemented as “Tap at the screen point (x0, y0)”. A 
Robotium script will be implemented as “Press the button with the text 
“OK” .”&lt;br /&gt;
When actions are described at the interface level, the 
testing script can be made independent of interface layout, screen 
resolution, and orientation.&lt;br /&gt;
Additionally, Robotium allows you to 
check the application response to the action.For example, after clicking
 the «OK» button, the list with the “Item 1” item should appear.You can 
check list element names with Robotium. If you check the application 
state after each step, it is easy to find at which step the error 
occurred.&lt;br /&gt;
&lt;strong&gt;Disadvantages:&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;You need to develop a test script in Java* for each application. This requires programming skills and time.&lt;/li&gt;
&lt;li&gt;When the application interface changes, the event sequence must be redone.&lt;/li&gt;
&lt;/ul&gt;
In general, Robotium allows you to develop the highest quality test cases with adequate cost.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;/div&gt;
&lt;h2&gt;
Feature Matrix&lt;/h2&gt;
&lt;table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;0&quot; style=&quot;width: 665px;&quot;&gt;
 &lt;colgroup&gt;&lt;col width=&quot;131&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;146&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;190&quot;&gt;&lt;/col&gt;
 &lt;col width=&quot;182&quot;&gt;&lt;/col&gt;
 &lt;/colgroup&gt;&lt;tbody&gt;
&lt;tr&gt;
  &lt;th width=&quot;131&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/th&gt;
  &lt;th width=&quot;146&quot;&gt;
   Monkey&lt;br /&gt;

  &lt;/th&gt;
  &lt;th width=&quot;190&quot;&gt;
   MonkeyRunner&lt;br /&gt;

  &lt;/th&gt;
  &lt;th width=&quot;182&quot;&gt;
   Robotium&lt;br /&gt;

  &lt;/th&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;License&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   Available with Android SDK&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   Available with Android SDK&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   Open source&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;Random user actions&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   Yes&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   No&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   No&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;Record and Playback&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   No&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   Yes&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   Placback&lt;br /&gt;
available&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;Script Complexity&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   -&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   Yes&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   Yes&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;Define actions on&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   -&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   Input device level&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   Application&lt;br /&gt;
UI level&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;Script language&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   -&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   Python&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   Java&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   &lt;br /&gt;
   &lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;tr&gt;
  &lt;td width=&quot;131&quot;&gt;
   &lt;strong&gt;Maintenance costs&lt;/strong&gt;&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;146&quot;&gt;
   No&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;190&quot;&gt;
   Need to modify script if UI changes&lt;br /&gt;

  &lt;/td&gt;
  &lt;td width=&quot;182&quot;&gt;
   Need to modify&lt;br /&gt;
script if UI&lt;br /&gt;
changes&lt;br /&gt;

  &lt;/td&gt;
 &lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h1&gt;
Summary&lt;/h1&gt;
Automated testing with Monkey is a good starting 
point for any application. It is possible that this method will show 
adequate results for a particular application.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/5423640425093557096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2013/06/android-app-automtion-testing-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/5423640425093557096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/5423640425093557096'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2013/06/android-app-automtion-testing-tools.html' title='Android App : Automtion Testing Tools - Part II'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-8698033040563700696</id><published>2013-05-27T14:20:00.000+05:30</published><updated>2013-06-14T15:34:46.929+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Android"/><title type='text'>Android App : Automtion Testing Tools - Part I</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h1 id=&quot;AndroidApp-AutomtionTestingTools-Introduction&quot;&gt;
Introduction&lt;/h1&gt;
As the mobile platform continues to pervade all aspects of human activities,&lt;br /&gt;
and mobile apps on such platform tend to be faulty just like other types of software,&lt;br /&gt;
There is a growing need for automated testing techniques for mobile applications.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;&amp;nbsp;Why Do Automate -&amp;nbsp;&lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Reduce ongoing costs of regression testing across multiple devices.&lt;/li&gt;
&lt;li&gt;Create
 Automation which is reusable across multiple handsets with minimal 
changes to scripts to cater existing as well as future handsets.&lt;/li&gt;
&lt;li&gt;To minimize challenges in manual testing, load testing, crashes&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Limitation of Manual Testing&lt;/strong&gt; -&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Diversity of devises&lt;/li&gt;
&lt;li&gt;OS versions&lt;/li&gt;
&lt;li&gt;Different h/w configuration&lt;/li&gt;
&lt;li&gt;Different screen sizes&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;h1 id=&quot;AndroidApp-AutomtionTestingTools-CoveredAutomationTools&quot;&gt;
Different Automation Tools&lt;/h1&gt;
&lt;ol&gt;
&lt;li&gt;Monkey&lt;/li&gt;
&lt;li&gt;Monkey Runner&lt;/li&gt;
&lt;li&gt;Robotium&lt;/li&gt;
&lt;li&gt;Selenium Webdriver&lt;/li&gt;
&lt;/ol&gt;
&lt;strong&gt;Monkey - &lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;The Monkey is a command-line tool that that you can run on any emulator instance or on a device.&lt;/li&gt;
&lt;li&gt;We can send random user events which acts as a stress test on the application&lt;/li&gt;
&lt;li&gt;Help to determine crashes or any sort of unhandled exception&lt;/li&gt;
&lt;li&gt;When the Monkey runs, it generates events and sends them to the system&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Monkey Runner - &lt;/strong&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Multiple device control&lt;/li&gt;
&lt;li&gt;Functional
 testing: can run an automated start-to-finish test of an Android 
application. You provide input values with keystrokes or touch events, 
and view the results as screenshots.&lt;/li&gt;
&lt;li&gt;It is like record and playback tool, will record user actions / input, we can execute those on emulator / devices&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Robotium&lt;/strong&gt; -&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Open-source test framework&lt;/li&gt;
&lt;li&gt;Need to write solid test case&lt;/li&gt;
&lt;li&gt;The framework handles multiple Android activities automatically&lt;/li&gt;
&lt;li&gt;Must have basic knowledge of Android programming.&lt;/li&gt;
&lt;li&gt;Support testing on real devices&lt;/li&gt;
&lt;li&gt;System and acceptance test&lt;/li&gt;
&lt;/ul&gt;
&lt;strong&gt;Android Webdriver&lt;/strong&gt; -&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Tests can only be written in Java&lt;/li&gt;
&lt;li&gt;Android WebDriver models many user interactions such as finger taps, flicks, finger scrolls and long presses&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/8698033040563700696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2013/05/android-app-automtion-testing-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8698033040563700696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8698033040563700696'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2013/05/android-app-automtion-testing-tools.html' title='Android App : Automtion Testing Tools - Part I'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-3030539308590368871</id><published>2013-05-10T15:38:00.001+05:30</published><updated>2013-05-10T15:38:43.007+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="QTP"/><title type='text'>Introduction To Quick Test Professional</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;span style=&quot;color: #9fc5e8; font-family: Verdana, sans-serif;&quot;&gt;Now along with selenium we will have post regarding different automation tools.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #9fc5e8; font-family: Verdana, sans-serif;&quot;&gt;Quick Test Professional is one of the automation tool.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #9fc5e8;&quot;&gt;Quick Test Professional&lt;/span&gt; , popularly know by its acronym QTP is the functional automation testing tool from Mercury Interactive now acquired by HP. It is now called as HP Functional Test&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;QuickTest Professional is the solution for functional test and regression test automation.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;QTP is easier to use and implement for both technical &amp;amp; non technical testers in comparison to other functional testing tools available.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;QTP&#39;s Scripting Language is VB Script which is easy to use , understand and program.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Quick Test Professional is the most widely used tool for the purpose of Test automation and has emerged as the test automation tool of choice for the software industry.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #9fc5e8;&quot;&gt;Why QTP&lt;/span&gt; -&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It is easy even for a non-programmer to understand QTP and start adding test cases.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Support for record and playback and ability to edit scripts after recording. Also different recording modes are provided in QTP viz. Normal, Analog &amp;amp; Low level.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Excellent Object Identification process / mechanism&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Ability to let you enhance the existing tests even without the AUT (Application under test) through active screen.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Supports all popular Automation frameworks - Keyword driven testing approach, Data driven testing approach, Modular testing approach, Hybrid frameworks etc.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;QTP comes with an inbuilt IDE, which is simple and easy to use.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;QTP can be integrated with Test management tools like QC (Quality Center), Test director and also functional test tools like Winrunner. The test cases can be mapped to the automation scripts and be executed from QC (Quality Center) itself. Also, it can kick off Winrunner test execution from within.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Easy to maintain different types of suites viz. Smoke, Sanity, Regression etc.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It comes with loads of inbuilt properties and methods in QTP as well as inbuilt functions in VBScripts&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Use of Datatables/Excel files are easier and provides a variety of methods to play around with rows and columns.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Easy to maintain test iterations and data driving the tests through configurations.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Test reporting with all necessary details for analysis is provided.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Microsoft Object model can be implanted in QTP easily (Example – Word document object, Excel Object, Outlook Object, ADO objects, File system objects, DOM etc)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/3030539308590368871/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2013/05/introduction-to-quick-test-professional.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3030539308590368871'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3030539308590368871'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2013/05/introduction-to-quick-test-professional.html' title='Introduction To Quick Test Professional'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-8864187371401867007</id><published>2012-12-31T17:23:00.001+05:30</published><updated>2012-12-31T17:29:24.875+05:30</updated><title type='text'>Happy New Year !!</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;/div&gt;
&lt;br /&gt;
&lt;h2 style=&quot;text-align: left;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;Wish
you and your family a Joyful, Bright, Healthy,Prosperous and Happiest
New Year ahead!&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;strong&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;
&lt;strong style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;Happy New Year 2013!!&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;display: inline !important; text-align: center;&quot;&gt;
&lt;h2 style=&quot;display: inline !important; text-align: left;&quot;&gt;
&lt;strong style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;strong&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;/span&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/strong&gt;&lt;div style=&quot;display: inline !important; text-align: center;&quot;&gt;
&lt;strong style=&quot;text-align: left;&quot;&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;div style=&quot;display: inline !important;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/h2&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/span&gt;&lt;/strong&gt;&lt;/h2&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/AVvXsEi59wVWX022x92JWnVLZA_hmFodqBfnAwxZHeCta1OeAHGp9q2_DD82L1UmUJgrnV2khDi8dL2dh12Hh-CT97m09ZgNT110LLpPa2-6lzOyntVjdme1rb-stB8H4x5nrfJKwD7L-xdr0vY/s1600/images+(1).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/AVvXsEi59wVWX022x92JWnVLZA_hmFodqBfnAwxZHeCta1OeAHGp9q2_DD82L1UmUJgrnV2khDi8dL2dh12Hh-CT97m09ZgNT110LLpPa2-6lzOyntVjdme1rb-stB8H4x5nrfJKwD7L-xdr0vY/s1600/images+(1).jpg&quot; /&gt;&lt;/a&gt;&lt;/div&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/AVvXsEiadakLY1Z9i3YTsUKLYltXilyQwtCNpVEHgCQkab42oX-GHchibJCkB9t_CCYiOki5Eq5xn2T86VNXtHkV5ZmeO8wNdazpK9-kksTXvneg9A_PH198gthNWMMy6tLdqUmn-ryv5A5fBkQ/s1600/images+(2).jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;146&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiadakLY1Z9i3YTsUKLYltXilyQwtCNpVEHgCQkab42oX-GHchibJCkB9t_CCYiOki5Eq5xn2T86VNXtHkV5ZmeO8wNdazpK9-kksTXvneg9A_PH198gthNWMMy6tLdqUmn-ryv5A5fBkQ/s400/images+(2).jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUgTLC4S_mImo7k5r3m5qTh8_KzKACHfPtT92V2hv5s1Q3PxGHubYBrEq-oPU4uhEKgD1p9rCPvHKJszQ6_XzwdgoIDn5J2P4PRnNVs2UCbvQ4CvK_S1ZNAnMia9FqdIsehIiThoU0YN0/s1600/download.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhUgTLC4S_mImo7k5r3m5qTh8_KzKACHfPtT92V2hv5s1Q3PxGHubYBrEq-oPU4uhEKgD1p9rCPvHKJszQ6_XzwdgoIDn5J2P4PRnNVs2UCbvQ4CvK_S1ZNAnMia9FqdIsehIiThoU0YN0/s1600/download.jpg&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/8864187371401867007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/12/happy-new-year.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8864187371401867007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8864187371401867007'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/12/happy-new-year.html' title='Happy New Year !!'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi59wVWX022x92JWnVLZA_hmFodqBfnAwxZHeCta1OeAHGp9q2_DD82L1UmUJgrnV2khDi8dL2dh12Hh-CT97m09ZgNT110LLpPa2-6lzOyntVjdme1rb-stB8H4x5nrfJKwD7L-xdr0vY/s72-c/images+(1).jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-3793584805090470614</id><published>2012-10-03T15:07:00.000+05:30</published><updated>2012-10-09T11:05:29.790+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><title type='text'>Error Handling In Selenium RC</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;With help of error handling you can able to get details of failure.&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If any of the steps in your tests fails then selenium will throw an 
exception and tests would stop. If you handle the exceptions using &#39;try catch&#39;,&amp;nbsp;then you should be able to achieve what you are looking for.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As an 
example, see the code below. This would handle the Element Not Found Error.And you can write that exception to file&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;public void test() throws Exception {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;try {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;selenium.open(&quot;http://seleniumhq.org/&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;selenium.click(&quot;xpath=(//button[text()=&#39;Login&#39;])[2]&quot;);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}catch (SeleniumException e){ &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;&amp;nbsp;//If any error occurs&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;try{&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;//Code to write error in file&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;FileWriter fstream = new FileWriter(&quot;e:/filename1.txt&quot;,true); &lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;//Will &lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;write error details here, if file doesn&#39;t exists it will create new &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;BufferedWriter bw = new BufferedWriter(fstream);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;bw.write(&quot;Test Project &quot; + e.getMessage());&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;bw.newLine();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;     &lt;/span&gt;bw.close();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}catch(Exception a){ &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #e06666;&quot;&gt;//For File handling Error&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;System.out.println(&quot;Error In File Handling&quot;); &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;}&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #f1c232; font-family: Verdana, sans-serif;&quot;&gt;Output&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #f1c232; font-family: Verdana, sans-serif;&quot;&gt;Test Project ERROR: Element xpath=(//button[text()=&#39;Login&#39;])[2] not found&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/3793584805090470614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/10/error-handling-in-selenium-rc.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3793584805090470614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3793584805090470614'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/10/error-handling-in-selenium-rc.html' title='Error Handling In Selenium RC'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-547511355999996518</id><published>2012-09-04T16:25:00.000+05:30</published><updated>2012-10-03T15:13:29.045+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><title type='text'>Verify the height and width of image in Selenium </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;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;You can verify image height and width with help of selenium.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;I have shared sample script. In this script i&#39;m storing width and height of image and then comparing it with expected&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;width and height.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;CODE -&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;int wid = (Integer) selenium.getElementWidth(&quot;css=p &amp;gt; img.medialeft&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;int hght = (Integer) selenium.getElementHeight(&quot;css=p &amp;gt; img.medialeft&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;System.out.println(wid);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;System.out.println(hght);&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;if ((hght == 234) &amp;amp;&amp;amp; (wid == 140))&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;System.out.println(&quot;image size&quot; +wid + &quot; X &quot; &amp;nbsp;+ hght + &quot;pixels&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;Else&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;System.out.println(&quot;Image width and height is not matching with expected&quot;);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here expected&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;width and height is 140 and 234 respectively.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In if condition it is checking whether&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;width and height is same as required, if it is same it will print, else will move to other part or any error message.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/547511355999996518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/09/verify-height-and-width-of-image-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/547511355999996518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/547511355999996518'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/09/verify-height-and-width-of-image-in.html' title='Verify the height and width of image in Selenium '/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-779652570433550778</id><published>2012-09-04T16:09:00.000+05:30</published><updated>2012-10-03T17:32:37.079+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><title type='text'>Compare a variable with blank value in selenium</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To compare variable with blank value, you can try solution like suggested      below - &lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here &#39;test&#39; and &#39;j&#39; are two variable. j having blank value.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It will compare &#39;test&#39; and &#39;j&#39; variable and accordingly it will display message  whether test variable is blank or not.&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;storeValue  |  element  |  test
store          |           |  j  (blank value)
gotoIf        |  storedVars[&#39;test&#39;]==storedVars[&#39;j&#39;]  |  true
getEval      |  alert(&quot;test Variable Value is not blank&quot;)
gotolabel   |  finish
label         |  true
getEval      |  alert(&quot;test Variable Value is blank&quot;)
label         |  finish&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #6fa8dc; font-family: Verdana, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/779652570433550778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/09/compare-variable-with-blank-value-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/779652570433550778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/779652570433550778'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/09/compare-variable-with-blank-value-in.html' title='Compare a variable with blank value in selenium'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-1091469381733690836</id><published>2012-09-04T15:25:00.003+05:30</published><updated>2012-12-26T11:40:00.658+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><title type='text'>Xpath to determine checkbox “checked” attribute</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;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;If there is multiple check-boxes with same ids and you have to select the next check-box which is not selected/checked.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For such scenario you can refer below script -&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&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/AVvXsEh2F9CE1Gn-Ck-W-Y3stTOnvDe69qpAUb9ST_xtANGCZAQcH9hHxIs4rVf8B4MccCdti9bRpYFBjo3MWMWrMe3HBsRw9810XHqCefSgiSDRDbxShd9qfkLDVxJO_3ooDltZamJd5-7rS-g/s1600/check-box.png&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/AVvXsEh2F9CE1Gn-Ck-W-Y3stTOnvDe69qpAUb9ST_xtANGCZAQcH9hHxIs4rVf8B4MccCdti9bRpYFBjo3MWMWrMe3HBsRw9810XHqCefSgiSDRDbxShd9qfkLDVxJO_3ooDltZamJd5-7rS-g/s1600/check-box.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Here &#39;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;code&gt;stnewrecord&#39;&lt;/code&gt; &lt;/span&gt;is class of check-box.
Script will store number of check-box, and according to that loop will follow.
It will check whether check-box is checked or not if not it will check else move to next step.&lt;/span&gt;&lt;/div&gt;
&lt;pre class=&quot;default prettyprint&quot;&gt;&lt;code&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span class=&quot;pln&quot;&gt;xpath&lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;=(&lt;/span&gt;&lt;span class=&quot;com&quot;&gt;//input[@class=&#39;stnewrecord&#39;])[${i}] &amp;nbsp;&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This is xpath of check-box. &#39;i&#39; is position, it will increase on each iteration.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/1091469381733690836/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/09/xpath-to-determine-checkbox-checked.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/1091469381733690836'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/1091469381733690836'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/09/xpath-to-determine-checkbox-checked.html' title='Xpath to determine checkbox “checked” attribute'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2F9CE1Gn-Ck-W-Y3stTOnvDe69qpAUb9ST_xtANGCZAQcH9hHxIs4rVf8B4MccCdti9bRpYFBjo3MWMWrMe3HBsRw9810XHqCefSgiSDRDbxShd9qfkLDVxJO_3ooDltZamJd5-7rS-g/s72-c/check-box.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-6814831225747009741</id><published>2012-09-04T15:02:00.001+05:30</published><updated>2012-09-04T17:17:44.930+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><title type='text'>Configure Selenium RC With JUnit Using Eclipse</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;text-align: left;&quot;&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Before configuring Selenium RC with Junit Using Eclipse below components are required -&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br class=&quot;Apple-interchange-newline&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1.Install JRE : &lt;a href=&quot;http://www.java.com/en/download/&quot;&gt;http://www.java.com/en/download/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2.Download Eclipse IDE for Java Developers : &lt;a href=&quot;http://www.eclipse.org/downloads/&quot;&gt;http://www.eclipse.org/downloads/&lt;/a&gt;&lt;br /&gt;3. Download Latest version of JUnit: &lt;a href=&quot;https://github.com/KentBeck/junit/downloads&quot;&gt;https://github.com/KentBeck/junit/downloads&lt;/a&gt;&lt;br /&gt;4.Download and Install Selenium IDE firefox plugin : &lt;a href=&quot;http://seleniumhq.org/download/&quot;&gt;http://seleniumhq.org/download/&lt;/a&gt;&lt;br /&gt;5.Download Selenium RC server and Selenium Client Drivers for Java:&lt;a href=&quot;http://seleniumhq.org/download/&quot;&gt;http://seleniumhq.org/download/&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once done with above steps launch Eclipse.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;After launching eclipse, you need to Create New Project for selenium scripts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;
Go to File &amp;gt; New &amp;gt; Project then In Select a Wizard Click Java Project. Then provide all details like project name.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once new project is created, right click on project go to&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Build Path &amp;gt; Configure Build Path.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Click on&amp;nbsp;Libraries&amp;nbsp;menu when pop-up appears, then click to &quot;Add External Jar&#39;s &quot;. Select&amp;nbsp;Selenium RC server and Selenium Client Drivers for Java which is downloaded from&amp;nbsp;&lt;a href=&quot;http://seleniumhq.org/download/&quot;&gt;http://seleniumhq.org/download/&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&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/AVvXsEhcHILo5DLUU6t9L63L-pDgEvO_Y-h_eVY061kMKjFabPQHHrn9sUMYSnOXaspUBI4zk9pfW-KR2SAdiGDc9vYVrGpWyTPxwK7vjKL1W6dB7JRCJFwKeyXUkex4l0VIhl3s5XfXrIhiPec/s1600/Add+ext+Jars.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;291&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcHILo5DLUU6t9L63L-pDgEvO_Y-h_eVY061kMKjFabPQHHrn9sUMYSnOXaspUBI4zk9pfW-KR2SAdiGDc9vYVrGpWyTPxwK7vjKL1W6dB7JRCJFwKeyXUkex4l0VIhl3s5XfXrIhiPec/s320/Add+ext+Jars.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once it is done, now build path is configured and project is ready to use.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now create a package for project.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once package is created then next step will be to create class.&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Right click on Package and add new class, it will ask for name. Click on Finish once class name is provided.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&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/AVvXsEhg188vqVXab8txhv2g_NlSWP-xU14wDaiiXMeiaQLai0kjDK_Wem0fVIeAFUnPfBTKjeQyrY1MfBM72kobhHk9l8BIiE_r1jINo-SJFxOkZm-L9jsklJaz7b1SBIZQ2sjNPOJxO0U2Bzc/s1600/class.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhg188vqVXab8txhv2g_NlSWP-xU14wDaiiXMeiaQLai0kjDK_Wem0fVIeAFUnPfBTKjeQyrY1MfBM72kobhHk9l8BIiE_r1jINo-SJFxOkZm-L9jsklJaz7b1SBIZQ2sjNPOJxO0U2Bzc/s320/class.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;Once done with all above steps, your package explorer looks like below -&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&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/AVvXsEi2YEezWIruAARXeUQVc9YzP_lfAuMKYdkAo2eUKZoW5GRzPG4rL4WqN8xOSaT3aRfjB2m2yLfN4Qrm7Y-GljujgWTEiHC-dlZ7MB6LG4EdJ5xXfl1X1XptHIhQLp4h_0-EkLa6qlj__lI/s1600/package+exp.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;209&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2YEezWIruAARXeUQVc9YzP_lfAuMKYdkAo2eUKZoW5GRzPG4rL4WqN8xOSaT3aRfjB2m2yLfN4Qrm7Y-GljujgWTEiHC-dlZ7MB6LG4EdJ5xXfl1X1XptHIhQLp4h_0-EkLa6qlj__lI/s320/package+exp.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &#39;Courier New&#39;, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Once class is created you are ready to write script for selenium scenario. As well you can execute created script on eclipse IDE.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Thank you...&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/6814831225747009741/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/09/configure-selenium-rc-with-junit-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/6814831225747009741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/6814831225747009741'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/09/configure-selenium-rc-with-junit-using.html' title='Configure Selenium RC With JUnit Using Eclipse'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhcHILo5DLUU6t9L63L-pDgEvO_Y-h_eVY061kMKjFabPQHHrn9sUMYSnOXaspUBI4zk9pfW-KR2SAdiGDc9vYVrGpWyTPxwK7vjKL1W6dB7JRCJFwKeyXUkex4l0VIhl3s5XfXrIhiPec/s72-c/Add+ext+Jars.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-7099053591659733790</id><published>2012-05-03T14:41:00.000+05:30</published><updated>2012-12-26T11:42:43.111+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><category scheme="http://www.blogger.com/atom/ns#" term="Software Testing"/><title type='text'>CKeditor with Selenium IDE</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;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;There are two ways to deal with Ckeditor&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;focus &amp;nbsp;| &amp;nbsp;class=cke_show_borders&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;typeKeys | &amp;nbsp;class=cke_show_borders &amp;nbsp;| testing content&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&#39;cke_show_borders&#39; is a class of body area&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;runScript | CKEDITOR.instances[&quot;editor1&quot;].setData(&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;testContent&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&#39;editor1&#39; is instance of Ckeditor&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&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/AVvXsEh7ro2bCEWPji6-827m_6b94xLo0iDX2MVUViH5rM90EOToGvvX4pIdJCijs-E5akU1hmqxTHdGdrNU-rDoZx0ACeD5kbv2jiYFgHaQDYOM1diUAt6CkwSqODrc77YO2p4z-8VudElCfFc/s1600/Ckeditor.png&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/AVvXsEh7ro2bCEWPji6-827m_6b94xLo0iDX2MVUViH5rM90EOToGvvX4pIdJCijs-E5akU1hmqxTHdGdrNU-rDoZx0ACeD5kbv2jiYFgHaQDYOM1diUAt6CkwSqODrc77YO2p4z-8VudElCfFc/s1600/Ckeditor.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;With help of these option you can able to tackle with CKeditor.&lt;/span&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/7099053591659733790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/05/ckeditor-with-selenium-ide.html#comment-form' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/7099053591659733790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/7099053591659733790'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/05/ckeditor-with-selenium-ide.html' title='CKeditor with Selenium IDE'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh7ro2bCEWPji6-827m_6b94xLo0iDX2MVUViH5rM90EOToGvvX4pIdJCijs-E5akU1hmqxTHdGdrNU-rDoZx0ACeD5kbv2jiYFgHaQDYOM1diUAt6CkwSqODrc77YO2p4z-8VudElCfFc/s72-c/Ckeditor.png" height="72" width="72"/><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-8883272945044459381</id><published>2012-03-30T14:18:00.000+05:30</published><updated>2012-12-26T11:46:21.291+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><title type='text'>Selenium IDE and CAPTCHA</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;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Selenium
can only be used to test a web app protected by CAPTCHA if a human
involved for the test. So, if you are automating registration form of
any site that includes a CAPTCHA, you will require human interaction
during the specific section that requires a CAPTCHA response. &lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;There
are two ways in which you can automate CAPCHA&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;1.By
break command&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;2.By
input-box&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Suppose
after command 3, there is  CAPTCHA&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;1.By
break command&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Command
1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Command
2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Command
3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;4&lt;sup&gt;th&lt;/sup&gt;
command will be&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Break&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Enter
CAPTCHA manually and resume execution of test&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;continue
with your next commands&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;2.By
input-box&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Command
1&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Command
2&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;Command
3&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;4&lt;sup&gt;th&lt;/sup&gt;
command will be&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;storeEval
| prompt(“Enter value for captcha”);  |variable&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;type
 | locator of CAPTCHA field | ${variable}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;continue
with your next commands&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&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/AVvXsEiFhGZqKNoRQGMULRhdzID9PYZ8vX7HBFxVc5d_t9swZS3ghIYBZbEJ_CQ9BedgqabmKce4UEQqt1dmzrQ0M6OFYYI9BqJ7Ec3TVT6fGSirWOjJ1QrODv0iuvYOtsZdNjTxmp_6w7lpLxo/s1600/captcha.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; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFhGZqKNoRQGMULRhdzID9PYZ8vX7HBFxVc5d_t9swZS3ghIYBZbEJ_CQ9BedgqabmKce4UEQqt1dmzrQ0M6OFYYI9BqJ7Ec3TVT6fGSirWOjJ1QrODv0iuvYOtsZdNjTxmp_6w7lpLxo/s400/captcha.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/8883272945044459381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/03/selenium-ide-and-captcha.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8883272945044459381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/8883272945044459381'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/03/selenium-ide-and-captcha.html' title='Selenium IDE and CAPTCHA'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiFhGZqKNoRQGMULRhdzID9PYZ8vX7HBFxVc5d_t9swZS3ghIYBZbEJ_CQ9BedgqabmKce4UEQqt1dmzrQ0M6OFYYI9BqJ7Ec3TVT6fGSirWOjJ1QrODv0iuvYOtsZdNjTxmp_6w7lpLxo/s72-c/captcha.jpg" height="72" width="72"/><thr:total>14</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-355022958924800065</id><published>2012-03-03T18:22:00.002+05:30</published><updated>2012-03-03T18:23:19.894+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium"/><title type='text'>Selenium supported browsers</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;h3 class=&quot;post-title entry-title&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;

&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/h3&gt;
&lt;div class=&quot;post-header&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;


&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
Below are the browsers which selenium supports :&lt;/span&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;/span&gt;


&lt;pre class=&quot;default prettyprint&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code&gt;&lt;span class=&quot;pln&quot;&gt;
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;firefox
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;mock
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;firefoxproxy
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;pifirefox
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;chrome
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;iexploreproxy
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;iexplore
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;firefox3
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;safariproxy
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;googlechrome
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;konqueror
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;firefox2
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;safari
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;piiexplore
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;firefoxchrome
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;opera
&amp;nbsp; &lt;/span&gt;&lt;span class=&quot;pun&quot;&gt;*&lt;/span&gt;&lt;span class=&quot;pln&quot;&gt;iehta&lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/355022958924800065/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/03/selenium-supported-browsers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/355022958924800065'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/355022958924800065'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/03/selenium-supported-browsers.html' title='Selenium supported browsers'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-2481610579935440893</id><published>2012-03-03T18:06:00.000+05:30</published><updated>2012-03-03T18:07:36.191+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><title type='text'>Debugging Tests in Selenium IDE</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;h3 class=&quot;western&quot;&gt;

&lt;/h3&gt;
&lt;div dir=&quot;LTR&quot; id=&quot;post-body-1575736718909021426&quot;&gt;
&lt;div align=&quot;LEFT&quot; style=&quot;margin-bottom: 0in;&quot;&gt;
Below are the methods or
 ways of Debugging your selenium IDE scripts..&lt;br /&gt;
&lt;br /&gt;
Selenium IDE
 reports failures in the log console, and failed test cases within
 the suite are shown in red.&lt;br /&gt;
The failing test cases and commands
 are highlighted in red, so it’s easy to see &lt;i&gt;what&lt;/i&gt; failed,
 but quite often it can be difficult to understand &lt;i&gt;why&lt;/i&gt; it
 failed. This information is all in the log, but if you’ve run more
 than just a couple of tests then it will be difficult to match up
 the failing commands to the errors in the log.&lt;br /&gt;
&lt;br /&gt;
There are a
 few ways to debug these failures and work out if your application
 under test has bugs, or perhaps your tests require some
 changes&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Execute Individual Command:&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
When
 you double-click a command in Selenium IDE it will be executed –
 this is very handy when first writing your tests. You could use this
 to step through each command in each test case until you find a
 failure, and investigate from there.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Custom Log
 Messages:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
There’s a command in Selenium IDE named &lt;code class=&quot;western&quot;&gt;echo&lt;/code&gt;
 and this will basically repeat whatever you type into the log when
 the test is executed. You could use this to output a message
 associated with an expected failure, and then find this in the log.
 You do still have to scroll through the log to look for your
 messages though.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Slow Down:&lt;/b&gt;&lt;br /&gt;
You can use the speed
 slider 
 &lt;img align=&quot;BOTTOM&quot; border=&quot;0&quot; height=&quot;16&quot; name=&quot;graphics1&quot; src=&quot;http://blargon7.com/wp-content/uploads/2011/05/speed-control.png&quot; width=&quot;56&quot; /&gt;
 to slow down how fast your test commands are executed. This can be
 helpful as you can watch the application under test while your tests
 are running and see any obvious issues that your tests are failing
 on. You can also use this in combination with executing commands
 manually by pausing your tests.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Pause, Break and
 Step:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
You can pause your test at any time, either by
 clicking the Pause icon 
 &lt;img align=&quot;BOTTOM&quot; border=&quot;0&quot; height=&quot;16&quot; name=&quot;graphics2&quot; src=&quot;http://blargon7.com/wp-content/uploads/2011/05/pause.png&quot; width=&quot;16&quot; /&gt;
 in the toolbar or by setting breakpoints. Set a breakpoint by
 right-clicking on a command you want Selenium IDE to pause &lt;i&gt;before&lt;/i&gt;
 executing, and selecting ‘Toggle Breakpoint’ from the
 context-menu. You will see a small pause icon appear to the left of
 your command.&lt;br /&gt;
When Selenium IDE is paused, the Step icon 
 &lt;img align=&quot;BOTTOM&quot; border=&quot;0&quot; height=&quot;16&quot; name=&quot;graphics3&quot; src=&quot;http://blargon7.com/wp-content/uploads/2011/05/step.png&quot; width=&quot;16&quot; /&gt;
 becomes available. You can use this to execute one command at a
 time, which can be very useful when approaching a failure or working
 through a number of verification failures. If you have set multiple
 breakpoints then you can click the Resume icon to continue executing
 your tests and stop at the next breakpoint.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Set Start
 Point:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
If you have a really long test and it’s failing
 towards the end, then you can set a custom start point so that you
 don’t have to run the entire test when you’re investigating the
 failure. For example, your test might register a new user, log in,
 and then fail on the welcome page. You could simply navigate to the
 welcome page yourself and set your test to start from there. To set
 a start point simply right click on the first command you want
 Selenium IDE to execute and click ‘Set / Clear Start Point’. You
 will see a small play icon appear to the left of your
 command.&lt;br /&gt;
&lt;br /&gt;
There are many ways that Selenium IDE can assist you
 in investigating failures and debugging your tests.&lt;/div&gt;
&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/2481610579935440893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/03/debugging-tests-in-selenium-ide.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/2481610579935440893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/2481610579935440893'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/03/debugging-tests-in-selenium-ide.html' title='Debugging Tests in Selenium IDE'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-3898081931047450573</id><published>2012-03-03T17:20:00.000+05:30</published><updated>2012-03-10T12:23:09.652+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><title type='text'>Selenium IDE -Get  Current Time, Date, Month and Year</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;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Current Time - javascript{(new Date().getHours()+&quot; : &quot; + new Date().getMinutes() + &quot; : &quot; + new Date().getSeconds())}&lt;/span&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Current year - javascript{(new Date()).getFullYear()}&lt;/span&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Current Month - javascript{(new Date().getMonth()) + 1}&lt;/span&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;br style=&quot;font-family: Verdana,sans-serif;&quot; /&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Current date - javascript{(new Date().getDate().toString())}&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/3898081931047450573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/03/selenium-ide-get-curent-date-time-and.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3898081931047450573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/3898081931047450573'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/03/selenium-ide-get-curent-date-time-and.html' title='Selenium IDE -Get  Current Time, Date, Month and Year'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3329749476743375090.post-2052944398483323316</id><published>2012-03-03T17:03:00.000+05:30</published><updated>2012-03-03T17:05:20.737+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Selenium IDE"/><title type='text'>Selenium IDE - Locating Elements in Page.</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;font-family: Verdana,sans-serif;&quot;&gt;
&lt;/div&gt;
&lt;h1 class=&quot;western&quot; style=&quot;font-family: Verdana,sans-serif;&quot;&gt;



&lt;/h1&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;For most of the Selenium commands target is required. This target
identifies an element in the content of the web application. The
various locator types are:&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;1. Identifying elements by ID&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;2. Identifying elements by Name&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;3. Identifying elements by Link&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;4. Identifying elements by XPath&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;5. Identifying elements by CSS&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;6. Identifying elements by DOM&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;For identifying elements, we need some applications.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;FireBug&lt;/b&gt;: Firebug integrates with Firefox to put a
wealth of web development tools at your fingertips while you browse.
You can edit, debug, and monitor CSS, HTML, and JavaScript live in
any web page.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;We can download this from this website: &lt;a href=&quot;http://getfirebug.com/&quot;&gt;http://getfirebug.com/&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Just Drag and Drop firebug.xpi to Firefox it will install.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;With the help of FireBug you can &lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;1. Identifying elements by ID&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;2. Identifying elements by Name&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Identifying elements by DOM&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Few examples for DOM&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;getElementById()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;getElementsByName()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;getElementsByTagName()&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;code class=&quot;western&quot;&gt;getElementsByClassName()&lt;/code&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0); border-style: none none double; border-width: medium medium 1.1pt; font-family: Verdana,sans-serif; padding: 0in 0in 0.03in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; margin-bottom: 0.2in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;identifier&lt;/b&gt;=&lt;i&gt;id&lt;/i&gt;&lt;br /&gt;Select
the element with the specified @id attribute. If no match is found,
select the first element whose @name attribute is &lt;i&gt;id&lt;/i&gt;.&lt;br /&gt;(This
is normally the default; see below.)&lt;br /&gt;&lt;b&gt;id&lt;/b&gt;=&lt;i&gt;id&lt;/i&gt;&lt;br /&gt;Select
the element with the specified @id attribute.&lt;br /&gt;&lt;b&gt;name&lt;/b&gt;=&lt;i&gt;name&lt;/i&gt;&lt;br /&gt;Select
the first element with the specified @name attribute.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;username&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;name=username&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;The name may optionally be followed by one or more
&lt;i&gt;element-filters&lt;/i&gt;, separated from the name by whitespace. If the
&lt;i&gt;filterType&lt;/i&gt; is not specified, &lt;b&gt;value&lt;/b&gt; is
assumed.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;name=flavour value=chocolate&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;dom&lt;/b&gt;=&lt;i&gt;javascriptExpression&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Find
an element using Javascript traversal of the HTML Document
Object&lt;br /&gt;Model. DOM locators &lt;i&gt;must&lt;/i&gt; begin with &quot;document.&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;dom=document.forms[&#39;myForm&#39;].myDropdown&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;dom=document.images[56]&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;xpath&lt;/b&gt;=&lt;i&gt;xpathExpression&lt;/i&gt;&lt;br /&gt;Locate an
element using an XPath expression.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;xpath=//img[@alt=&#39;The image alt
 text&#39;]&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;xpath=//table[@id=&#39;table1&#39;]//tr[4]/td[2]&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;link&lt;/b&gt;=&lt;i&gt;textPattern&lt;/i&gt;&lt;br /&gt;Select the
link (anchor) element which contains text matching the&lt;br /&gt;specified
&lt;i&gt;pattern&lt;/i&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;link=The link text&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;css&lt;/b&gt;=&lt;i&gt;cssSelectorSyntax&lt;/i&gt;&lt;br /&gt;Select
the element using css selectors. Please refer to CSS2 selectors, CSS3
selectors&lt;br /&gt;for more information. You can also check the
TestCssLocators test in&lt;br /&gt;the selenium test suite for an example of
usage, which is included in&lt;br /&gt;the downloaded selenium core package.&lt;/span&gt;&lt;/div&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;
&lt;li&gt;&lt;div style=&quot;margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;css=a[href=&quot;#id3&quot;]&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;css=span#firstChild + span&lt;/span&gt;&lt;br /&gt;

&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif; margin-bottom: 0in;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://radical-qa.blogspot.com/feeds/2052944398483323316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://radical-qa.blogspot.com/2012/03/locating-elements-in-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/2052944398483323316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3329749476743375090/posts/default/2052944398483323316'/><link rel='alternate' type='text/html' href='http://radical-qa.blogspot.com/2012/03/locating-elements-in-page.html' title='Selenium IDE - Locating Elements in Page.'/><author><name>Radical-QA</name><uri>http://www.blogger.com/profile/17851035572830166701</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwvC-tbEzP2BIwoj0My8cA5080F0WgRUuujwawGuOv6B-VYhvpApZdMuf3AcrM0B66tG367rbr-QaWAQDccMksJ7RK1pIpR-fUPUGTSV7crHRIGT87L5E9jUKJCMWlqQ/s220/431467_459881190700654_1086104739_n.jpg'/></author><thr:total>0</thr:total></entry></feed>