<?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-7166551016086279840</id><updated>2024-10-06T21:43:30.838-07:00</updated><category term="Xpath"/><title type='text'>Lets discuss something</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-5243117784458664597</id><published>2012-10-07T13:59:00.001-07:00</published><updated>2012-10-07T14:08:46.669-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Xpath"/><title type='text'>How to create a xpath for 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;/div&gt;Xpath is language using we can get the element of the xml.&lt;br /&gt;
&lt;br /&gt;
So probably you are thinking about how to create xpath using xpath language.&lt;br /&gt;
&lt;br /&gt;
My point of view you should remember below mentioned point whenever you are creating xpath.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;1) Always create short xpath.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;2) Don’t use dynamic data(Like className,id.. etc) in xpath.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) If you are feeling that your browser text(like button name ,link text,textbox text etc) are not changing frequently then you should use text only.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Like xpaths for link:-&lt;br /&gt;
&lt;br /&gt;
//*[text()=&#39;SignIn&#39;]&lt;br /&gt;
&lt;br /&gt;
//*[contains(text(),&#39;Home&#39;)]&lt;br /&gt;
&lt;br /&gt;
//*[starts-with(text(),&quot;in your mind)]&lt;br /&gt;
&lt;br /&gt;
for button:-&lt;br /&gt;
&lt;br /&gt;
//*[@value=&#39;Login&#39;] or //*[@*=&#39;Login&#39;]&lt;br /&gt;
&lt;br /&gt;
etc&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;3) If same page having more than one xpath then use postion or create xpath depending upon the other text/control.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Like:-&lt;br /&gt;
&lt;br /&gt;
//*[@*=&#39;Post&#39;][position()=1]&lt;br /&gt;
&lt;br /&gt;
if you want to access last button&lt;br /&gt;
&lt;br /&gt;
//*[@*=&#39;Post&#39;][position()=last()]&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;if all the button/links are getting displayed whenever you are using position=1 then use following xpath and mention postion according your requirment. &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
(//*[@*=&#39;Post&#39;])[position()=3]&lt;br /&gt;
&lt;br /&gt;
create xpath depending upon the other text/control:&lt;br /&gt;
&lt;br /&gt;
//*[text()=&#39;Agent Page&#39;]/parent::*/parent::*/descendant::*[@*=&#39;Post&#39;]&lt;br /&gt;
&lt;br /&gt;
for more details about the above mentioned functions refer following link &lt;a href=&quot; http://www.w3.org/TR/xpath20/&quot;&gt;http://www.w3.org/TR/xpath20/&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;4) After creating xpath,verify same using xpath checker/firebug/xpather plugin.These are firefox plugin.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
if above mentioned plugins are displaying same control as your browser.then your xpath is correct :-) </content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/5243117784458664597/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2012/10/how-to-create-xpath-for-selenium.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/5243117784458664597'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/5243117784458664597'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2012/10/how-to-create-xpath-for-selenium.html' title='How to create a xpath for selenium'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-4206774717364242999</id><published>2011-06-14T11:38:00.000-07:00</published><updated>2011-06-14T11:49:10.657-07:00</updated><title type='text'>How to resolve &quot;Could not start Internet Explorer Application through OLE&quot; issue in Windows 7</title><content type='html'>1)Open command prompt and run as administrator.&lt;br /&gt;
2)Now you can run your IEautomation script.&lt;br /&gt;
Now your&#39;s script is working fine.</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/4206774717364242999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/06/how-to-resolve-issue-in-windows-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/4206774717364242999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/4206774717364242999'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/06/how-to-resolve-issue-in-windows-7.html' title='How to resolve &quot;Could not start Internet Explorer Application through OLE&quot; issue in Windows 7'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-1072940545361686924</id><published>2011-05-20T12:17:00.000-07:00</published><updated>2011-05-20T12:17:26.481-07:00</updated><title type='text'>IFRAME tag  is not working in Win32:IEautomation</title><content type='html'>if you want to get iframe then use following solution:&lt;br /&gt;
1)use SendKeys function for this.&lt;br /&gt;
2)if your popup windows is not recognized,then takes the url of popup windows using the regular expression(when link is javascript) otherwise use linkUrl(); for url.&lt;br /&gt;
open in same or differnet IE window and use according your requirment.</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/1072940545361686924/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/iframe-tag-is-not-working-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/1072940545361686924'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/1072940545361686924'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/iframe-tag-is-not-working-in.html' title='IFRAME tag  is not working in Win32:IEautomation'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-1062253501169513548</id><published>2011-05-20T11:54:00.000-07:00</published><updated>2011-05-20T11:54:14.433-07:00</updated><title type='text'>Win32:IEautomation script hangs after displaying popup window.</title><content type='html'>1)if this stuation occur then use following solutions:&lt;br /&gt;
a)After displaying popup window,it doesn&#39;t load page completly,thats why its goes into infinite loop.&lt;br /&gt;
so copy exists function and create one more function for click() like ClickWithoutWait() and remove WaitforDone line from this function.&lt;br /&gt;
Use ClickWithoutWait() function for displays popup window.</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/1062253501169513548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/win32ieautomation-script-hangs-after.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/1062253501169513548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/1062253501169513548'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/win32ieautomation-script-hangs-after.html' title='Win32:IEautomation script hangs after displaying popup window.'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-1184185782515000328</id><published>2011-05-10T09:46:00.000-07:00</published><updated>2011-05-20T12:03:18.443-07:00</updated><title type='text'>how to get specific span link using Win32:IEAumation</title><content type='html'>Copy exists getLink() function and create one more function like getSpanLink().&lt;br /&gt;
changed following line&lt;br /&gt;
my $links = $agent-&gt;Document-&gt;links;&lt;br /&gt;
to&lt;br /&gt;
$inputs = $agent-&gt;Document-&gt;all-&gt;tags(&quot;span&quot;);&lt;br /&gt;
&lt;br /&gt;
now you can use this function for all the html tag ,those having &quot;span&quot; tag.</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/1184185782515000328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-get-specific-span-link-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/1184185782515000328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/1184185782515000328'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-get-specific-span-link-using.html' title='how to get specific span link using Win32:IEAumation'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-4201177219428680015</id><published>2011-05-10T09:44:00.000-07:00</published><updated>2011-06-14T12:07:28.471-07:00</updated><title type='text'>how to access specific button using Win32:Ieautomation?</title><content type='html'>1)Copy exists _getObject function and create a new _getObject(like Sub _getObjectSpecific and add for loop for access spefific button.&lt;br /&gt;
2)Now create a any function for specific link/button/list...&lt;br /&gt;
For example:for specifc button&lt;br /&gt;
&lt;br /&gt;
sub getSpecificButton{&lt;br /&gt;
 my ($self, $how, $what,$i) = @_;&lt;br /&gt;
 my $agent = $self-&gt;{agent};&lt;br /&gt;
 my $buttons = $agent-&gt;Document-&gt;all-&gt;tags(&quot;input&quot;);&lt;br /&gt;
 my $target_button = __getObject1($buttons, $how, $what,$i) if ($buttons);&lt;br /&gt;
 my $button_object;&lt;br /&gt;
 if ($target_button){&lt;br /&gt;
  $button_object = Win32::IEAutomation::Element-&gt;new();&lt;br /&gt;
  $button_object-&gt;{element} = $target_button;&lt;br /&gt;
  $button_object-&gt;{parent} = $self;&lt;br /&gt;
 }else{&lt;br /&gt;
  $button_object = undef;&lt;br /&gt;
  print &quot;WARNING: No button is  present in the document with your specified option $how $what\n&quot; if $warn;&lt;br /&gt;
 }&lt;br /&gt;
 return $button_object;&lt;br /&gt;
}</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/4201177219428680015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/4201177219428680015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/4201177219428680015'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html' title='how to access specific button using Win32:Ieautomation?'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-4011507174951728228</id><published>2011-05-10T09:42:00.000-07:00</published><updated>2011-06-14T12:08:20.200-07:00</updated><title type='text'>How to get specific link using  win32:IEautomation</title><content type='html'>use below link for solution:&lt;br /&gt;
http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/4011507174951728228/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-get-specific-link-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/4011507174951728228'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/4011507174951728228'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-get-specific-link-using.html' title='How to get specific link using  win32:IEautomation'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-924894493475473311</id><published>2011-05-07T19:54:00.000-07:00</published><updated>2011-05-09T03:29:15.645-07:00</updated><title type='text'>How to get link,those don&#39;t have  &quot;a herf &quot; using win32:IEAutomation</title><content type='html'>Copy exists getLink function and create another function like getSpanLink and change below line:&lt;br /&gt;
my $links = $agent-&gt;Document-&gt;links;&lt;br /&gt;
change to&lt;br /&gt;
my $buttons = $agent-&gt;Document-&gt;all-&gt;tags(&quot;span&quot;);&lt;br /&gt;
&lt;br /&gt;
Now you are able to access span link also.</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/924894493475473311/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-get-linkthose-dont-have-herf.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/924894493475473311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/924894493475473311'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-get-linkthose-dont-have-herf.html' title='How to get link,those don&#39;t have  &quot;a herf &quot; using win32:IEAutomation'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-8646542866752521747</id><published>2011-05-06T18:53:00.000-07:00</published><updated>2011-06-14T12:09:59.689-07:00</updated><title type='text'>How to use specific textbox and textarea when tags/class/name..etc(every thing) are same</title><content type='html'>use below link for solution:&lt;br /&gt;
http://ieautomationproblems.blogspot.com/2011/05/how-to-access-specific-button-using.html</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/8646542866752521747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-use-specific-textbox-and.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/8646542866752521747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/8646542866752521747'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/how-to-use-specific-textbox-and.html' title='How to use specific textbox and textarea when tags/class/name..etc(every thing) are same'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7166551016086279840.post-7693888872419346416</id><published>2011-05-06T18:41:00.000-07:00</published><updated>2011-05-06T18:54:23.900-07:00</updated><title type='text'>Win32::IEAutomation not working with &quot;button&quot; tags</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;1)Win32::IEAutomation not working with &quot;button&quot; tags&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
Copy exists getButton function and create a new function like get ButtonButtonTag and modify below mentioned line in your new function:&lt;br /&gt;
&lt;br /&gt;
&quot;my $buttons = $agent-&gt;Document-&gt;all-&gt;tags(&quot;input&quot;);&quot;&lt;br /&gt;
changed to&lt;br /&gt;
&quot;my $buttons = $agent-&gt;Document-&gt;all-&gt;tags(&quot;button&quot;); &quot;&lt;br /&gt;
&lt;br /&gt;
Now you can use getButtonButtonTag function for &quot;button&quot; tag.&lt;br /&gt;
Like &quot;getButtonButtonTag(&#39;class:&#39;,&quot;getButton&quot;);&quot;&lt;br /&gt;
&lt;br /&gt;
Note: Don&#39;t modify your exists functions because it may be effect your exists scripts.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;&lt;/div&gt;&lt;/button&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ieautomationproblems.blogspot.com/feeds/7693888872419346416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/win32ieautomation-problems.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/7693888872419346416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7166551016086279840/posts/default/7693888872419346416'/><link rel='alternate' type='text/html' href='http://ieautomationproblems.blogspot.com/2011/05/win32ieautomation-problems.html' title='Win32::IEAutomation not working with &quot;button&quot; tags'/><author><name>Lets discuss someting</name><uri>http://www.blogger.com/profile/05231219361693276002</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>