<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Selenium Locator Tips</title>
	<atom:link href="http://jodiem.com.au/2010/03/22/selenium-locator-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/</link>
	<description>The Website and Blog of Jodie Miners</description>
	<lastBuildDate>Wed, 25 Jan 2012 02:34:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Krishnam1234</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-5126</link>
		<dc:creator><![CDATA[Krishnam1234]]></dc:creator>
		<pubDate>Wed, 30 Nov 2011 10:54:32 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-5126</guid>
		<description><![CDATA[@Jodie

I could finally succeed in getting this working (y). Below is a sample working code for your reference.



import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverBackedSelenium;

import com.thoughtworks.selenium.Selenium;

/**
 * User Story: BI-32 - Write automated (selenium) test scripts for all the TG events


	@Test
	public void testApproveWorkflow() {

		selenium.open(&quot;http://localhost:8080/BizzForce/#&quot;);		
		selenium.type(LoginForm.USERNAME_INPUT_FIELD, &quot;admin&quot;);
		selenium.type(LoginForm.PASSWORD_INPUT_FIELD, &quot;admin&quot;);
		selenium.click(LoginForm.LOGIN_BUTTON);
		selenium.click(&quot;id=render-grid&quot;);
		selenium.click(&quot;//table[@id=&#039;bf-grid&#039;]/tbody/tr/td[1]/div[@class=&#039;GMHeadLeft&#039;]/table[@class=&#039;GMSectionFF3&#039;]/tbody/tr[2]/td[3]&quot;);
		selenium.click(&quot;//table[@id=&#039;bf-grid&#039;]/tbody/tr/td[1]/div[@class=&#039;GMHeadLeft&#039;]/table[@class=&#039;GMSectionFF3&#039;]/tbody/tr[2]/td[3]&quot;);
			
	}

	@After
	public void finish() {
		System.out.println(&quot;Finished &quot; + testName + &quot;...&quot;);
		System.out.println(&quot;-----&quot;);		
		nl.myapp.selenium.core.AssertHelper.checkForVerificationErrors();
	}

}]]></description>
		<content:encoded><![CDATA[<p>@Jodie</p>
<p>I could finally succeed in getting this working (y). Below is a sample working code for your reference.</p>
<p>import org.junit.After;<br />
import org.junit.Before;<br />
import org.junit.Test;<br />
import org.openqa.selenium.firefox.FirefoxDriver;<br />
import org.openqa.selenium.WebDriver;<br />
import org.openqa.selenium.WebDriverBackedSelenium;</p>
<p>import com.thoughtworks.selenium.Selenium;</p>
<p>/**<br />
 * User Story: BI-32 &#8211; Write automated (selenium) test scripts for all the TG events</p>
<p>	@Test<br />
	public void testApproveWorkflow() {</p>
<p>		selenium.open(&#8220;http://localhost:8080/BizzForce/#&#8221;);<br />
		selenium.type(LoginForm.USERNAME_INPUT_FIELD, &#8220;admin&#8221;);<br />
		selenium.type(LoginForm.PASSWORD_INPUT_FIELD, &#8220;admin&#8221;);<br />
		selenium.click(LoginForm.LOGIN_BUTTON);<br />
		selenium.click(&#8220;id=render-grid&#8221;);<br />
		selenium.click(&#8220;//table[@id='bf-grid']/tbody/tr/td[1]/div[@class='GMHeadLeft']/table[@class='GMSectionFF3']/tbody/tr[2]/td[3]&#8220;);<br />
		selenium.click(&#8220;//table[@id='bf-grid']/tbody/tr/td[1]/div[@class='GMHeadLeft']/table[@class='GMSectionFF3']/tbody/tr[2]/td[3]&#8220;);</p>
<p>	}</p>
<p>	@After<br />
	public void finish() {<br />
		System.out.println(&#8220;Finished &#8221; + testName + &#8220;&#8230;&#8221;);<br />
		System.out.println(&#8220;&#8212;&#8211;&#8221;);<br />
		nl.myapp.selenium.core.AssertHelper.checkForVerificationErrors();<br />
	}</p>
<p>}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishnam Raju</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-5122</link>
		<dc:creator><![CDATA[Krishnam Raju]]></dc:creator>
		<pubDate>Mon, 28 Nov 2011 19:32:36 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-5122</guid>
		<description><![CDATA[This is one of the hardest exercises that I see many people have given up.. Aka TreeGrid testing. We either see very little help or see many people saying not possible to automate TreeGrid (including TreeeGrid developers).

Just want to give it a try if QA Folks can do some magic here ;)]]></description>
		<content:encoded><![CDATA[<p>This is one of the hardest exercises that I see many people have given up.. Aka TreeGrid testing. We either see very little help or see many people saying not possible to automate TreeGrid (including TreeeGrid developers).</p>
<p>Just want to give it a try if QA Folks can do some magic here <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishnam Raju</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-5121</link>
		<dc:creator><![CDATA[Krishnam Raju]]></dc:creator>
		<pubDate>Mon, 28 Nov 2011 19:26:13 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-5121</guid>
		<description><![CDATA[Thanks for your reply Jodie. I found out from one of the blog posts that we can use SeleniumBackedWebDriver to do a trick. I tried the same with some reference and it indeed worked on the COQSoft webiste. However, the same does not work with our application. I guess, you can add some suggestions / tricks to get this working. 

This could be a very good brain sharpening exercise to try selenium expertise. hehe

Thanks in advance :)

Reference Link: http://www.sencha.com/forum/showthread.php?142755-TreeGrid&amp;p=681092]]></description>
		<content:encoded><![CDATA[<p>Thanks for your reply Jodie. I found out from one of the blog posts that we can use SeleniumBackedWebDriver to do a trick. I tried the same with some reference and it indeed worked on the COQSoft webiste. However, the same does not work with our application. I guess, you can add some suggestions / tricks to get this working. </p>
<p>This could be a very good brain sharpening exercise to try selenium expertise. hehe</p>
<p>Thanks in advance <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Reference Link: <a href="http://www.sencha.com/forum/showthread.php?142755-TreeGrid&#038;p=681092" rel="nofollow">http://www.sencha.com/forum/showthread.php?142755-TreeGrid&#038;p=681092</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: joe</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-5110</link>
		<dc:creator><![CDATA[joe]]></dc:creator>
		<pubDate>Wed, 16 Nov 2011 19:44:39 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-5110</guid>
		<description><![CDATA[Thank you very much for taking the time to create this very useful post.  I really appreciate it.]]></description>
		<content:encoded><![CDATA[<p>Thank you very much for taking the time to create this very useful post.  I really appreciate it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jodie Miners</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-4907</link>
		<dc:creator><![CDATA[Jodie Miners]]></dc:creator>
		<pubDate>Sun, 25 Sep 2011 07:17:43 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-4907</guid>
		<description><![CDATA[The whole point of Selenium is that you should not need to use x,y coordinates. If you can&#039;t find the item by a locator, it must mean you are using Flash or some other embedded object?]]></description>
		<content:encoded><![CDATA[<p>The whole point of Selenium is that you should not need to use x,y coordinates. If you can&#8217;t find the item by a locator, it must mean you are using Flash or some other embedded object?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Amol</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-4906</link>
		<dc:creator><![CDATA[Amol]]></dc:creator>
		<pubDate>Sun, 25 Sep 2011 04:16:20 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-4906</guid>
		<description><![CDATA[Hi Jodie,
Please let me know how to click at specific xy coordinate without using locator ?]]></description>
		<content:encoded><![CDATA[<p>Hi Jodie,<br />
Please let me know how to click at specific xy coordinate without using locator ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jodie Miners</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-4891</link>
		<dc:creator><![CDATA[Jodie Miners]]></dc:creator>
		<pubDate>Mon, 22 Aug 2011 01:10:04 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-4891</guid>
		<description><![CDATA[@Krishnam 

Without spending many hours remembering how I did the extremely complicated selenium testing I did a few years back, I&#039;m sorry I can&#039;t help you specifically.

I can say that Xpath is your friend. Use Xpath at all times instead of mouse events. You will need to learn how to traverse the DOM using Xpath and using the children or siblings to find the exact element ID to click on relative to a known element. 

eg //td[contains(text()),&#039;My Label&#039;]/following-sibling::td[2]/input 

You know the Div of the overall grid, you know the fixed labels or even fixed image names for the add button, so find those, then find the table or other element nearby this element that you know how to find. 

Or use CSS selectors. This is one that I did not investigate fully, but could be very useful to you.

Whatever you do, it is going to be hard, and very time consuming. I know that Selenium can do it, as I have done it before, but I&#039;m not convinced it was worth the effort, as the Selenium code ends up being very fragile as it is based on the Xpath references - as soon as a new version of the grid control is released - all your tests may need to be written again.]]></description>
		<content:encoded><![CDATA[<p>@Krishnam </p>
<p>Without spending many hours remembering how I did the extremely complicated selenium testing I did a few years back, I&#8217;m sorry I can&#8217;t help you specifically.</p>
<p>I can say that Xpath is your friend. Use Xpath at all times instead of mouse events. You will need to learn how to traverse the DOM using Xpath and using the children or siblings to find the exact element ID to click on relative to a known element. </p>
<p>eg //td[contains(text()),'My Label']/following-sibling::td[2]/input </p>
<p>You know the Div of the overall grid, you know the fixed labels or even fixed image names for the add button, so find those, then find the table or other element nearby this element that you know how to find. </p>
<p>Or use CSS selectors. This is one that I did not investigate fully, but could be very useful to you.</p>
<p>Whatever you do, it is going to be hard, and very time consuming. I know that Selenium can do it, as I have done it before, but I&#8217;m not convinced it was worth the effort, as the Selenium code ends up being very fragile as it is based on the Xpath references &#8211; as soon as a new version of the grid control is released &#8211; all your tests may need to be written again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Krishnam Raju</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-4873</link>
		<dc:creator><![CDATA[Krishnam Raju]]></dc:creator>
		<pubDate>Tue, 02 Aug 2011 08:54:43 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-4873</guid>
		<description><![CDATA[Hi Jodie, Nice Article.

I am however stuckup with mouseAt,MouseDown and MouseUp events while testing TreeGrid component. We have the below reply from TreeGrid when asked for info:

TreeGrid uses low 
level DOM and JavaScript to be as fast as possible, especially it uses 
innerHTML attribute as the fastest way of changing DOM, so the automated 
testing tools usually fail on it. (We test TreeGrid always manually.)

This is an event log of pressing Add icon in Toolbar:
OnMouseDown: Cell [Toolbar,Add] at [11,7].
OnMouseUp: Cell [Toolbar,Add] at [11,7].
OnClick: User clicked cell [Toolbar,Add] at [11,7]. Cell value is &#039;&#039;.
OnCanRowAdd: Test if is possible add row to root as the last row
OnGenerateId: The identity attribute (id) of the row &#039;&#039; was set to &#039;__&#039;
OnSetRowId: The id attribute of the row &#039;__&#039; was set to &#039;__&#039;
OnRowAdd: User ADDED new row &#039;__&#039; to root as the last row
OnScroll: Grid was scrolled from position [0,15] to new position [0,16];
OnCalculate: row &#039;__&#039; children are calculated
OnCalculate: TreeGrid is calculated
OnRowAdded: Row &#039;__&#039; was sucessfully added
OnScroll: Grid was scrolled from position [0,16] to new position [0,30];
OnFocus: User focused cell [__,null]. Original focused cell was [none,none].

You can watch these events in TreeGrid &quot;Extended JavaScript API example&quot; 
in &quot;Universal local HTML and JavaScript API examples&quot; section of our 
downloadable TreeGridEval versions.

Ref URL:http://www.treegrid.com/treegrid/www/

Can you please help us with automating this?]]></description>
		<content:encoded><![CDATA[<p>Hi Jodie, Nice Article.</p>
<p>I am however stuckup with mouseAt,MouseDown and MouseUp events while testing TreeGrid component. We have the below reply from TreeGrid when asked for info:</p>
<p>TreeGrid uses low<br />
level DOM and JavaScript to be as fast as possible, especially it uses<br />
innerHTML attribute as the fastest way of changing DOM, so the automated<br />
testing tools usually fail on it. (We test TreeGrid always manually.)</p>
<p>This is an event log of pressing Add icon in Toolbar:<br />
OnMouseDown: Cell [Toolbar,Add] at [11,7].<br />
OnMouseUp: Cell [Toolbar,Add] at [11,7].<br />
OnClick: User clicked cell [Toolbar,Add] at [11,7]. Cell value is &#8221;.<br />
OnCanRowAdd: Test if is possible add row to root as the last row<br />
OnGenerateId: The identity attribute (id) of the row &#8221; was set to &#8216;__&#8217;<br />
OnSetRowId: The id attribute of the row &#8216;__&#8217; was set to &#8216;__&#8217;<br />
OnRowAdd: User ADDED new row &#8216;__&#8217; to root as the last row<br />
OnScroll: Grid was scrolled from position [0,15] to new position [0,16];<br />
OnCalculate: row &#8216;__&#8217; children are calculated<br />
OnCalculate: TreeGrid is calculated<br />
OnRowAdded: Row &#8216;__&#8217; was sucessfully added<br />
OnScroll: Grid was scrolled from position [0,16] to new position [0,30];<br />
OnFocus: User focused cell [__,null]. Original focused cell was [none,none].</p>
<p>You can watch these events in TreeGrid &#8220;Extended JavaScript API example&#8221;<br />
in &#8220;Universal local HTML and JavaScript API examples&#8221; section of our<br />
downloadable TreeGridEval versions.</p>
<p>Ref URL:<a href="http://www.treegrid.com/treegrid/www/" rel="nofollow">http://www.treegrid.com/treegrid/www/</a></p>
<p>Can you please help us with automating this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hugo</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-4855</link>
		<dc:creator><![CDATA[Hugo]]></dc:creator>
		<pubDate>Thu, 02 Jun 2011 23:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-4855</guid>
		<description><![CDATA[Thank you very much for your post.The section you talked about 4. Click and Mouse Events solved my questions I have been dealing with for the past hours.]]></description>
		<content:encoded><![CDATA[<p>Thank you very much for your post.The section you talked about 4. Click and Mouse Events solved my questions I have been dealing with for the past hours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Johannes Staffans&#187; Blog Archive &#187; Robot Framework proves its worth</title>
		<link>http://jodiem.com.au/2010/03/22/selenium-locator-tips/#comment-4848</link>
		<dc:creator><![CDATA[Johannes Staffans&#187; Blog Archive &#187; Robot Framework proves its worth]]></dc:creator>
		<pubDate>Thu, 26 May 2011 14:09:32 +0000</pubDate>
		<guid isPermaLink="false">http://jodiem.com.au/?p=289#comment-4848</guid>
		<description><![CDATA[[...] Selenium Locator Tips [...]]]></description>
		<content:encoded><![CDATA[<p>[...] Selenium Locator Tips [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

