[wtr-general] Re: Handling popups without using click_no_wait
But why cannot you get click_no_wait working? I've made a little blog post about debugging the problems with click_no_wait. Maybe you can give it a try to see some specific reasons. http://www.itreallymatters.net/post/378669758/debugging-watirs-click-no-wait-method-problems Also, there is a patch, which you might try: http://jira.openqa.org/browse/WTR-320 Jarmo On Apr 13, 4:07 am, Rats crapats...@yahoo.com.au wrote: Given I simply cannot get click_no_wait working with my current configuration are there any other ways of handling js popups? Currently I'm using: Win7 IE8 Watir 1.6.5 Ruby 1.8.6 (1 click installer version) -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Fwd: Donate to Watir
If you like the Watir project, you can make a donation. There is donate button at http://watir.com/. We have raised $570 this year. We will spend it on hosting and stuff like that. We will not spend it on beer, no matter how much I would like that. :) You can see list of donors and Bret's thank you note at http://pledgie.com/campaigns/2982 Željko -- watir.com - community manager pledgie.com/campaigns/2982 - donate to Watir watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Fwd: [selenium-developers] Proposal for a Selenium StackExchange site
On Tue, May 4, 2010 at 6:48 AM, Kunal kunal...@gmail.com wrote: Question - Are we targeting to move to stackexchange based community and hence leaving Google group? Yes. That is my personal goal. I am not sure what other people think. I think Stack Overflow software is the best solution for Watir support. Google group will probably live for some time, even if a lot of people move to Stack Overflow, but I hope it will die soon. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Fwd: [selenium-developers] Proposal for a Selenium StackExchange site
On Tue, May 4, 2010 at 8:28 AM, Betsy joybe...@gmail.com wrote: Got confused with how to create new proposal.. :( Betsy, Thanks a lot for your effort. I think you have copied Selenium proposal a bit too much. :) I will create the proposal and post a link here, so people could vote on it. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Fwd: [selenium-developers] Proposal for a Selenium StackExchange site
On Mon, May 3, 2010 at 8:34 PM, George george.sand...@gmail.com wrote: I am interested in helping, although I'm still a little unclear about what I need to do. George (and everybody else interested in helping), For now, all you have to do is: 1) Read http://meta.stackexchange.com/questions/6056/proposal-for-watir-site(1 minute) 2) If you like the idea, create account at http://meta.stackexchange.com/and vote the question up (1 minute) 3) If you do not like the idea, do nothing 4) If you really do not like the idea, create account at http://meta.stackexchange.com/ and vote the question down (1 minute) If you have any comments or questions, comment here or there or at http://twitter.com/#search?q=%23watirflow Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] canxth element
First off, apologies if I'm in the wrong group. Although I think I'm in the right place. I have the following html td id=zippyOne/td td id=zippyTwo/td td id=zippyThree/td .//*...@id='zippy']/@class is what xPath gives me for every one of those. How do I refer to the third one? I tried using ff.contains_text(One) and it gave me an index that was huge (1043) but couldn't translate that into anything. Advice on a solution, where to find a solution (I've searched the API) or otherwise is appreciated. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] canxth element
On Thu, May 6, 2010 at 4:58 PM, tjp kris...@gmail.com wrote: td id=zippyOne/td td id=zippyTwo/td td id=zippyThree/td How do I refer to the third one? Not tested, but should work: browser.cell(:text = Three) or browser.cell(:id = zippy, :text = Three) Željko -- watir.com - community manager pledgie.com/campaigns/2982 - donate to Watir watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: canxth element
I popped the OP's code into a simple html page and Željko's approach worked great. If the content in the third element might change (and not literally say something as friendly as Three), here's a more robust approach: MyCells = Array.new browser.cells.each do |cell| # If looking for a specific table, browser.table(:class, /testing/).cells.each do |cell| if cell.id == zippy # Assuming you only want the cells with this id MyCells [cell.id, cell.text] else end #if end #cells.each MyCells.last # Grab the last element MyCells[2] # Grab the third element Of course, if all you need is simple functionality, go with simple code! -Adam On May 6, 10:08 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 6, 2010 at 4:58 PM, tjp kris...@gmail.com wrote: td id=zippyOne/td td id=zippyTwo/td td id=zippyThree/td How do I refer to the third one? Not tested, but should work: browser.cell(:text = Three) or browser.cell(:id = zippy, :text = Three) Željko -- watir.com - community manager pledgie.com/campaigns/2982 - donate to Watir watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: canxth element
I popped the OP's code into a simple html page and Željko's approach worked great. If the content in the third element might change (and not literally say something as friendly as Three), here's a more robust approach: MyCells = Array.new browser.cells.each do |cell| # If looking for a specific table, browser.table(:class, /testing/).cells.each do |cell| if cell.id == zippy # Assuming you only want the cells with this id MyCells [cell.id, cell.text] else end #if end #cells.each MyCells.last # Grab the last element MyCells[2] # Grab the third element Of course, if all you need is simple functionality, go with simple code! -Adam On May 6, 10:08 am, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 6, 2010 at 4:58 PM, tjp kris...@gmail.com wrote: td id=zippyOne/td td id=zippyTwo/td td id=zippyThree/td How do I refer to the third one? Not tested, but should work: browser.cell(:text = Three) or browser.cell(:id = zippy, :text = Three) Željko -- watir.com - community manager pledgie.com/campaigns/2982 - donate to Watir watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: canxth element
Thanks to you both. Željko's code worked fine but I'll keep in mind your approach Adam. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] canxth element
Željko's solution is probably your best option. :) You can also access any of those three cells using XPath - here is a way that should work in IE and Firefox: browser.cell(:xpath, //td[.='Three']) The dot being compared to 'Three' represents the text of the cell. And if the cell text has leading or trailing whitespace, you can strip it from the text before doing the comparison: browser.cell(:xpath, //td[normalize-space(.)='Three']) Thanks Bill On Thu, May 6, 2010 at 8:08 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, May 6, 2010 at 4:58 PM, tjp kris...@gmail.com wrote: td id=zippyOne/td td id=zippyTwo/td td id=zippyThree/td How do I refer to the third one? Not tested, but should work: browser.cell(:text = Three) or browser.cell(:id = zippy, :text = Three) Željko -- watir.com - community manager pledgie.com/campaigns/2982 - donate to Watir watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Watir xpath navigation problem
Hello, Felipe, It sure does look like a bug. A workaround would be using the wildcard selector like this: @ie.text_field(:xpath, //*...@tabindex='4901']).set test Hopefully your tabindex property is unique to all elements :) Regards, FK On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi guys, I'm evaluating Watir, and I'm trying to simple get an element using its XPath. But I'm having a problem. First look at the problem. I have the following element in my page: input type=text maxlength=15 tabindex=4901 Notice that it doesn't have name neither id attributes. When I try to get it using xpath: browser.text_field(:xpath, // inp...@tabindex='4901']).set(something) I get the following error: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, // inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/elements/text_field.rb:149:in `set' from waitir_adm_jp_1.rb:10 Watir can't find the element. But if I try to get other element that have id or name attributes using xpath (in the very same page) I can get it, without problems. My guess is that Watir can't acess elements without name or id attribute, even if it isn't used in xpath query, the element must have it. Is it right? If not, where am I making mistake? Thanks. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir xpath navigation problem
Hi there, I'm not sure how many text fields are on the page, but have you considered using the :index attribute? @ie.text_field(:index, 5).set something On May 6, 12:07 pm, Felipe Pedrini felipedr...@gmail.com wrote: Hello, FK, Yes, it was I thought, a bug, but I came ask here just to confirm. I've tried the workaround, and I have no success. The error continues: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, //*...@tabindex='4901'] (Watir::Exception::UnknownObjectException) And, yes, my tabindex is unique. Do you have any other sugestion? I'm not a specialist in xpath queries. Thanks! On 6 maio, 15:42, Felipe Knorr Kuhn fkn...@gmail.com wrote: Hello, Felipe, It sure does look like a bug. A workaround would be using the wildcard selector like this: @ie.text_field(:xpath, //*...@tabindex='4901']).set test Hopefully your tabindex property is unique to all elements :) Regards, FK On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi guys, I'm evaluating Watir, and I'm trying to simple get an element using its XPath. But I'm having a problem. First look at the problem. I have the following element in my page: input type=text maxlength=15 tabindex=4901 Notice that it doesn't have name neither id attributes. When I try to get it using xpath: browser.text_field(:xpath, // inp...@tabindex='4901']).set(something) I get the following error: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, // inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/elements/text_field.rb:149:in `set' from waitir_adm_jp_1.rb:10 Watir can't find the element. But if I try to get other element that have id or name attributes using xpath (in the very same page) I can get it, without problems. My guess is that Watir can't acess elements without name or id attribute, even if it isn't used in xpath query, the element must have it. Is it right? If not, where am I making mistake? Thanks. -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog legroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Watir xpath navigation problem
Hello, That's weird. I noticed you're using Firefox, so I tested it under FF and it worked as well: require rubygems require watir @browser = FireWatir::Firefox.new @browser.goto file:///c:/teste.html @browser.text_field(:xpath, //*...@tabindex='4901']).set teste puts @browser.text_field(:xpath, //*...@tabindex='4901']).value ruby input.rb teste Exit code: 0 My environment: Microsoft Windows XP [Version 5.1.2600] ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] (Fire)Watir 1.6.5 FK On Thu, May 6, 2010 at 4:07 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hello, FK, Yes, it was I thought, a bug, but I came ask here just to confirm. I've tried the workaround, and I have no success. The error continues: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, //*...@tabindex='4901'] (Watir::Exception::UnknownObjectException) And, yes, my tabindex is unique. Do you have any other sugestion? I'm not a specialist in xpath queries. Thanks! On 6 maio, 15:42, Felipe Knorr Kuhn fkn...@gmail.com wrote: Hello, Felipe, It sure does look like a bug. A workaround would be using the wildcard selector like this: @ie.text_field(:xpath, //*...@tabindex='4901']).set test Hopefully your tabindex property is unique to all elements :) Regards, FK On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.com wrote: Hi guys, I'm evaluating Watir, and I'm trying to simple get an element using its XPath. But I'm having a problem. First look at the problem. I have the following element in my page: input type=text maxlength=15 tabindex=4901 Notice that it doesn't have name neither id attributes. When I try to get it using xpath: browser.text_field(:xpath, // inp...@tabindex='4901']).set(something) I get the following error: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, // inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/elements/text_field.rb:149:in `set' from waitir_adm_jp_1.rb:10 Watir can't find the element. But if I try to get other element that have id or name attributes using xpath (in the very same page) I can get it, without problems. My guess is that Watir can't acess elements without name or id attribute, even if it isn't used in xpath query, the element must have it. Is it right? If not, where am I making mistake? Thanks. -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@googlegroups.comwatir-general%252bunsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp:// groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir xpath navigation problem
Hi George, It's not a site developed by my team. Our role is to apply the automation test on it. I have no way to change anything on it. To use the index attribute on HTML source. And access it using the :index. But I've tried this anyway, using the :index hoping it will bind the tabindex. But, it was just a hope, it doesn't work (same error). Thanks On 6 maio, 16:25, George george.sand...@gmail.com wrote: Hi there, I'm not sure how many text fields are on the page, but have you considered using the :index attribute? @ie.text_field(:index, 5).set something On May 6, 12:07 pm, Felipe Pedrini felipedr...@gmail.com wrote: Hello, FK, Yes, it was I thought, a bug, but I came ask here just to confirm. I've tried the workaround, and I have no success. The error continues: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, //*...@tabindex='4901'] (Watir::Exception::UnknownObjectException) And, yes, my tabindex is unique. Do you have any other sugestion? I'm not a specialist in xpath queries. Thanks! On 6 maio, 15:42, Felipe Knorr Kuhn fkn...@gmail.com wrote: Hello, Felipe, It sure does look like a bug. A workaround would be using the wildcard selector like this: @ie.text_field(:xpath, //*...@tabindex='4901']).set test Hopefully your tabindex property is unique to all elements :) Regards, FK On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi guys, I'm evaluating Watir, and I'm trying to simple get an element using its XPath. But I'm having a problem. First look at the problem. I have the following element in my page: input type=text maxlength=15 tabindex=4901 Notice that it doesn't have name neither id attributes. When I try to get it using xpath: browser.text_field(:xpath, // inp...@tabindex='4901']).set(something) I get the following error: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, // inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/elements/text_field.rb:149:in `set' from waitir_adm_jp_1.rb:10 Watir can't find the element. But if I try to get other element that have id or name attributes using xpath (in the very same page) I can get it, without problems. My guess is that Watir can't acess elements without name or id attribute, even if it isn't used in xpath query, the element must have it. Is it right? If not, where am I making mistake? Thanks. -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@goog legroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Watir xpath navigation problem
Felipe, To test the :index locator, I created this simple file: input type=text maxlength=15 tabindex=4901 input type=text maxlength=15 tabindex=4902 input type=text maxlength=15 tabindex=4903 input type=text maxlength=15 tabindex=4904 input type=text maxlength=15 tabindex=4905 input type=text maxlength=15 tabindex=4906 input type=text maxlength=15 tabindex=4907 input type=text maxlength=15 tabindex=4908 input type=text maxlength=15 tabindex=4909 input type=text maxlength=15 tabindex=4910 What happens if you try this: require rubygems require watir @browser = FireWatir::Firefox.new @browser.goto file:///c:/teste.html i = 1 1.upto(@browser.text_fields.size) do @browser.text_field(:index, i).set i.to_s i += 1 end You should be able to identify the correct index to use on your field with that. FK On Thu, May 6, 2010 at 4:52 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi George, It's not a site developed by my team. Our role is to apply the automation test on it. I have no way to change anything on it. To use the index attribute on HTML source. And access it using the :index. But I've tried this anyway, using the :index hoping it will bind the tabindex. But, it was just a hope, it doesn't work (same error). Thanks On 6 maio, 16:25, George george.sand...@gmail.com wrote: Hi there, I'm not sure how many text fields are on the page, but have you considered using the :index attribute? @ie.text_field(:index, 5).set something On May 6, 12:07 pm, Felipe Pedrini felipedr...@gmail.com wrote: Hello, FK, Yes, it was I thought, a bug, but I came ask here just to confirm. I've tried the workaround, and I have no success. The error continues: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, //*...@tabindex='4901'] (Watir::Exception::UnknownObjectException) And, yes, my tabindex is unique. Do you have any other sugestion? I'm not a specialist in xpath queries. Thanks! On 6 maio, 15:42, Felipe Knorr Kuhn fkn...@gmail.com wrote: Hello, Felipe, It sure does look like a bug. A workaround would be using the wildcard selector like this: @ie.text_field(:xpath, //*...@tabindex='4901']).set test Hopefully your tabindex property is unique to all elements :) Regards, FK On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi guys, I'm evaluating Watir, and I'm trying to simple get an element using its XPath. But I'm having a problem. First look at the problem. I have the following element in my page: input type=text maxlength=15 tabindex=4901 Notice that it doesn't have name neither id attributes. When I try to get it using xpath: browser.text_field(:xpath, // inp...@tabindex='4901']).set(something) I get the following error: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, // inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/elements/text_field.rb:149:in `set' from waitir_adm_jp_1.rb:10 Watir can't find the element. But if I try to get other element that have id or name attributes using xpath (in the very same page) I can get it, without problems. My guess is that Watir can't acess elements without name or id attribute, even if it isn't used in xpath query, the element must have it. Is it right? If not, where am I making mistake? Thanks. -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp:// groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed tohttp:// groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please
[wtr-general] Watir is unable to open nested modal windows using click_no_wait
I am having difficulty using click_no_wait to open a second modal window that is a child of the first modal window. click_no_wait does not open the modal window, click works to open the second modal window but then when the window is open, I am unable to interact with it. Ruby Version : ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] Watir Version:watir (1.6.5) Browser:IE 8.0.76 Autoit Autoit v3 -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Watir xpath navigation problem
Unsure if this is related, but a bug in the current version of Watir, 1.6.5, prevents some xpaths from being properly parsed. You can fix this by changing line 910 of ie-class.rb (C:\Ruby\lib\ruby\gems\1.8\gems \watir-1.6.5\lib\watir\ie-class.rb): Before: doc.search(xpath).each do |element| After: doc.xpath(xpath).each do |element| This will explicitly use xpath selectors, but it will also disable css selector support. See: http://github.com/bret/watir/commit/5e4a690918c792e8dd495e63971209323e739813 On May 6, 1:04 pm, Felipe Knorr Kuhn fkn...@gmail.com wrote: Felipe, To test the :index locator, I created this simple file: input type=text maxlength=15 tabindex=4901 input type=text maxlength=15 tabindex=4902 input type=text maxlength=15 tabindex=4903 input type=text maxlength=15 tabindex=4904 input type=text maxlength=15 tabindex=4905 input type=text maxlength=15 tabindex=4906 input type=text maxlength=15 tabindex=4907 input type=text maxlength=15 tabindex=4908 input type=text maxlength=15 tabindex=4909 input type=text maxlength=15 tabindex=4910 What happens if you try this: require rubygems require watir @browser = FireWatir::Firefox.new @browser.goto file:///c:/teste.html i = 1 1.upto(@browser.text_fields.size) do @browser.text_field(:index, i).set i.to_s i += 1 end You should be able to identify the correct index to use on your field with that. FK On Thu, May 6, 2010 at 4:52 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi George, It's not a site developed by my team. Our role is to apply the automation test on it. I have no way to change anything on it. To use the index attribute on HTML source. And access it using the :index. But I've tried this anyway, using the :index hoping it will bind the tabindex. But, it was just a hope, it doesn't work (same error). Thanks On 6 maio, 16:25, George george.sand...@gmail.com wrote: Hi there, I'm not sure how many text fields are on the page, but have you considered using the :index attribute? @ie.text_field(:index, 5).set something On May 6, 12:07 pm, Felipe Pedrini felipedr...@gmail.com wrote: Hello, FK, Yes, it was I thought, a bug, but I came ask here just to confirm. I've tried the workaround, and I have no success. The error continues: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, //*...@tabindex='4901'] (Watir::Exception::UnknownObjectException) And, yes, my tabindex is unique. Do you have any other sugestion? I'm not a specialist in xpath queries. Thanks! On 6 maio, 15:42, Felipe Knorr Kuhn fkn...@gmail.com wrote: Hello, Felipe, It sure does look like a bug. A workaround would be using the wildcard selector like this: @ie.text_field(:xpath, //*...@tabindex='4901']).set test Hopefully your tabindex property is unique to all elements :) Regards, FK On Thu, May 6, 2010 at 2:55 PM, Felipe Pedrini felipedr...@gmail.comwrote: Hi guys, I'm evaluating Watir, and I'm trying to simple get an element using its XPath. But I'm having a problem. First look at the problem. I have the following element in my page: input type=text maxlength=15 tabindex=4901 Notice that it doesn't have name neither id attributes. When I try to get it using xpath: browser.text_field(:xpath, // inp...@tabindex='4901']).set(something) I get the following error: D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/firewatir/ element.rb:907:in `assert_exists': Unable to locate element, using :xpath, // inp...@tabindex='4901'] (Watir::Exception::UnknownObjectException) from D:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.5/lib/ firewatir/elements/text_field.rb:149:in `set' from waitir_adm_jp_1.rb:10 Watir can't find the element. But if I try to get other element that have id or name attributes using xpath (in the very same page) I can get it, without problems. My guess is that Watir can't acess elements without name or id attribute, even if it isn't used in xpath query, the element must have it. Is it right? If not, where am I making mistake? Thanks. -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. You received this message because you