[wtr-general] Re: ajax and unable to locate element
Thanks Wesley. That worked. On Apr 8, 10:08 pm, Wesley Chen cjq@gmail.com wrote: Please don't use the method: try again The method below is really helpful. Watir::Waiter.wait_until{$ff.div(:id, addAlbumLink).exists?} Wesley. For life, the easier, the better. On Fri, Apr 9, 2010 at 2:00 AM, Sal Jamil salem.m.ja...@gmail.com wrote: mber of tries and wait between tries -- 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, reply using remove me as the subject.
Re: [wtr-general] Re: ajax and unable to locate element
please open irb, try 'browser.show_frames' maybe it's in a frame, so you can't get it . hope it's useful. 在 Thu, 08 Apr 2010 11:26:55 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: I am sorry, it is not available on the web. I can give you the source of the page but it references a lot of libraries and server code that I am not sure it will be helpful. Thanks for your help. On Wed, Apr 7, 2010 at 11:09 PM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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
Re: [wtr-general] Re: ajax and unable to locate element
Thanks. I tried that using IRB and I got There are 0 frames BUT Watir did not have a problem locating the new input field using IRB but it still throws the same Exception running the test from a file. I am going to google further on this issue. Thanks again. On Thu, Apr 8, 2010 at 12:12 PM, windy lyfi2...@sina.com wrote: please open irb, try 'browser.show_frames' maybe it's in a frame, so you can't get it . hope it's useful. 在 Thu, 08 Apr 2010 11:26:55 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: I am sorry, it is not available on the web. I can give you the source of the page but it references a lot of libraries and server code that I am not sure it will be helpful. Thanks for your help. On Wed, Apr 7, 2010 at 11:09 PM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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 -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.com This transmission may contain information that is intended to be confidential and solely for the use of ephicax, and those persons or entities to whom it is directed. It is not to be reproduced, retransmitted, or in any other manner distributed. If you received this message in error, please delete it from your system. -- 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
Re: [wtr-general] Re: ajax and unable to locate element
That's a strange thing . You should check the code of the file again . Google is good, Good luck to you. 在 Fri, 09 Apr 2010 00:24:47 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: To unsubscribe, reply using remove me as the subject. -- 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
Re: [wtr-general] Re: ajax and unable to locate element
I added a sleep(5) after the fire_event and Watir was able to find the new field: b.radio(:id, entryModeManual).fire_event(onclick) sleep(5) b.text_field(:name, 'order_ref[1]').set('OE123') Thanks for the help On Thu, Apr 8, 2010 at 12:24 PM, Sal Jamil salem.m.ja...@gmail.com wrote: Thanks. I tried that using IRB and I got There are 0 frames BUT Watir did not have a problem locating the new input field using IRB but it still throws the same Exception running the test from a file. I am going to google further on this issue. Thanks again. On Thu, Apr 8, 2010 at 12:12 PM, windy lyfi2...@sina.com wrote: please open irb, try 'browser.show_frames' maybe it's in a frame, so you can't get it . hope it's useful. 在 Thu, 08 Apr 2010 11:26:55 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: I am sorry, it is not available on the web. I can give you the source of the page but it references a lot of libraries and server code that I am not sure it will be helpful. Thanks for your help. On Wed, Apr 7, 2010 at 11:09 PM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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 -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.com This transmission may contain information that is intended to be confidential and solely for the use of ephicax, and those persons or entities to whom it is directed. It is not to be reproduced, retransmitted, or in any other manner distributed. If you received this message in error, please delete it from your system. -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.com This transmission may contain information that is intended to be confidential and solely for the use of ephicax, and those persons or entities to whom it is directed. It is not to be reproduced, retransmitted, or in any other manner distributed. If you received this message in error, please delete it from your system. -- 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
[wtr-general] Re: ajax and unable to locate element
If you'd like to be a little more exact in your approach, instead of using sleep you could wait_until the element exists. http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir On Apr 8, 11:45 am, Sal Jamil salem.m.ja...@gmail.com wrote: I added a sleep(5) after the fire_event and Watir was able to find the new field: b.radio(:id, entryModeManual).fire_event(onclick) sleep(5) b.text_field(:name, 'order_ref[1]').set('OE123') Thanks for the help On Thu, Apr 8, 2010 at 12:24 PM, Sal Jamil salem.m.ja...@gmail.com wrote: Thanks. I tried that using IRB and I got There are 0 frames BUT Watir did not have a problem locating the new input field using IRB but it still throws the same Exception running the test from a file. I am going to google further on this issue. Thanks again. On Thu, Apr 8, 2010 at 12:12 PM, windy lyfi2...@sina.com wrote: please open irb, try 'browser.show_frames' maybe it's in a frame, so you can't get it . hope it's useful. 在 Thu, 08 Apr 2010 11:26:55 +0800,Sal Jamil salem.m.ja...@gmail.com 写道: I am sorry, it is not available on the web. I can give you the source of the page but it references a lot of libraries and server code that I am not sure it will be helpful. Thanks for your help. On Wed, Apr 7, 2010 at 11:09 PM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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 -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.com This transmission may contain information that is intended to be confidential and solely for the use of ephicax, and those persons or entities to whom it is directed. It is not to be reproduced, retransmitted, or in any other manner distributed. If you received this message in error, please delete it from your system. -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.com This transmission may contain information that is intended to be confidential and solely for the use of ephicax, and those persons or entities to whom it is directed. It is not to be reproduced, retransmitted, or in any other manner distributed. If you received this message in error, please delete it from your system. -- 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
Re: [wtr-general] Re: ajax and unable to locate element
Please don't use the method: try again The method below is really helpful. Watir::Waiter.wait_until{$ff.div(:id, addAlbumLink).exists?} Wesley. For life, the easier, the better. On Fri, Apr 9, 2010 at 2:00 AM, Sal Jamil salem.m.ja...@gmail.com wrote: mber of tries and wait between tries -- 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, reply using remove me as the subject.
[wtr-general] Re: ajax and unable to locate element
On Apr 8, 12:16 pm, sal salem.m.ja...@gmail.com wrote: I am loading a form with an embedded table using Ajax. I am having trouble locating elements that are part of the form. I tried re- reading the dom and waiting using the following: @b=Watir::Browser.attach(:title,'sample') @b.wait() but I am still not able to locate any of the elements. For example: @b.text_field(:name, 'order_ref[1]').set('OE123') and I get the error: Watir::Exception::UnknownObjectException: Unable to locate element, using :name, order_ref[1] I can inspect that element with Firebug and the name is fine. I tried also using id, but I get the same error. Any help with this is much appreciated. Just a suggestion, rather than attach to an existing window try opening a browser and navigating directly to the page. Not sure if that will help ... -- 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, reply using remove me as the subject.
Re: [wtr-general] Re: ajax and unable to locate element
I just tried that and I am getting the same error. On Wed, Apr 7, 2010 at 10:19 PM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 12:16 pm, sal salem.m.ja...@gmail.com wrote: I am loading a form with an embedded table using Ajax. I am having trouble locating elements that are part of the form. I tried re- reading the dom and waiting using the following: @b=Watir::Browser.attach(:title,'sample') @b.wait() but I am still not able to locate any of the elements. For example: @b.text_field(:name, 'order_ref[1]').set('OE123') and I get the error: Watir::Exception::UnknownObjectException: Unable to locate element, using :name, order_ref[1] I can inspect that element with Firebug and the name is fine. I tried also using id, but I get the same error. Any help with this is much appreciated. Just a suggestion, rather than attach to an existing window try opening a browser and navigating directly to the page. Not sure if that will help ... -- 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, reply using remove me as the subject. -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.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
[wtr-general] Re: ajax and unable to locate element
On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject.
Re: [wtr-general] Re: ajax and unable to locate element
If there is ajax, please use *fire_event* before you *set* Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:09 AM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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
Re: [wtr-general] Re: ajax and unable to locate element
I used the fire_event ( @b.radio(:id, entryMode_manual).fire_event(onclick)) and I am still getting the same error. The event is firing fine since I am actually getting the div populated properly back from the server. Thanks On Wed, Apr 7, 2010 at 11:12 PM, Wesley Chen cjq@gmail.com wrote: If there is ajax, please use *fire_event* before you *set* Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:09 AM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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 -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.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
Re: [wtr-general] Re: ajax and unable to locate element
I am sorry, it is not available on the web. I can give you the source of the page but it references a lot of libraries and server code that I am not sure it will be helpful. Thanks for your help. On Wed, Apr 7, 2010 at 11:09 PM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.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
Re: [wtr-general] Re: ajax and unable to locate element
Thanks. I am using jquery to bind a click event to a button. Through Watir, I am setting the button and that event is firing correctly and populating the div from the server. Do I need to also do a fire_event? Isn't that duplicating the button set event? On Wed, Apr 7, 2010 at 11:12 PM, Wesley Chen cjq@gmail.com wrote: If there is ajax, please use *fire_event* before you *set* Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:09 AM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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 -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.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
Re: [wtr-general] Re: ajax and unable to locate element
Of course not. Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:25 AM, Sal Jamil salem.m.ja...@gmail.com wrote: Thanks. I am using jquery to bind a click event to a button. Through Watir, I am setting the button and that event is firing correctly and populating the div from the server. Do I need to also do a fire_event? Isn't that duplicating the button set event? On Wed, Apr 7, 2010 at 11:12 PM, Wesley Chen cjq@gmail.com wrote: If there is ajax, please use *fire_event* before you *set* Wesley. For life, the easier, the better. On Thu, Apr 8, 2010 at 11:09 AM, Rats crapats...@yahoo.com.au wrote: On Apr 8, 2:59 pm, Sal Jamil salem.m.ja...@gmail.com wrote: I just tried that and I am getting the same error. Is this page published on the web? If so then please provide a URL so we can have a look at it. It is very strange that firebug displays the element name yet Watir cannot find it. I've never had this problem ... -- 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, reply using remove me as the subject. -- 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 -- Sal Jamil • ephicax President Desk (650-585-2198)sal.ja...@ephicax.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 -- 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