Re: [wtr-general] It doesn't work when clicking a button in Updatepanel
Hi Green, Are your sure that after clicking btnAdd button manually you go to the next page? Thanks Regards, Ankur Gera On Mon, Jun 20, 2011 at 6:08 AM, Green Yin green...@gmail.com wrote: My web application uses the updatepanel control. See my watir scripts: { ie = Watir::IE.start(url) ie.text_field(:id, txtLogin).set(XXX) ie.text_field(:id, txtPassword).set(xxx) # Without using updatepanel ie.button(:id, btnLogin).click # Using updatepanel ie.button(:id, btnAdd).click } It's no problem when clicking Login button, the page will go to the next page. After clicking btnAdd button, the page just refresh without going to next page. I was tried to use id, name and value of the button to click it, but it's the same result. Does anyone met the problem? Thanks! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Simple popup example for Watir 1.9.0
something in the lines of if you are using watir version older than 1.9.0, then click here :) Jarmo On Jun 22, 12:50 am, Charley Baker charley.ba...@gmail.com wrote: I wouldn't call it old popup methods but something like watir pre-1.9.0 popup methods. It's more searchable and not as negative. :) -c On Tue, Jun 21, 2011 at 2:24 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Jun 21, 2011 at 6:31 PM, Darryl Brown d-l-br...@roadrunner.com wrote: My recommendation is that we create a page called old popup methods or something like that and put the old stuff there for some period of time - is this reasonable? Sounds good to me. :) Željko -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] It doesn't work when clicking a button in Updatepanel
Hi Green, It might not have clicked because you might have some other button with the same id. Seems like your id name sounds like a class name as most of the id name have some no on it so we gonna have to use some regular expressions. Try with the id and the regular expressions and let me know. browser.button(:id, /id-name/).click Hope that helps. Ashok On Wed, Jun 22, 2011 at 2:13 AM, Ankur Gera ankurg...@gmail.com wrote: Hi Green, Are your sure that after clicking btnAdd button manually you go to the next page? Thanks Regards, Ankur Gera On Mon, Jun 20, 2011 at 6:08 AM, Green Yin green...@gmail.com wrote: My web application uses the updatepanel control. See my watir scripts: { ie = Watir::IE.start(url) ie.text_field(:id, txtLogin).set(XXX) ie.text_field(:id, txtPassword).set(xxx) # Without using updatepanel ie.button(:id, btnLogin).click # Using updatepanel ie.button(:id, btnAdd).click } It's no problem when clicking Login button, the page will go to the next page. After clicking btnAdd button, the page just refresh without going to next page. I was tried to use id, name and value of the button to click it, but it's the same result. Does anyone met the problem? Thanks! -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Regards, Ashok Tulachan -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] set (variable) issue
I'm reading an integer value from an xls. file and save it in a variable called amount. Afterwards, I'm trying to send that variable value into a text field from a website, but I'm having some problems there. Here is the code: begin sleep 1 counter = counter + 1 browser.text_field(:name, name).set(amount) rescue if counter 10 retry end end If I use a direct value (like 5) instead or the amount variable it all works fine, but when trying in this form the form where the text field starts to change its position in the page :O I've tried as well with .value(variable) instead of .set(variable) but in this case nothing happens - the value is not sent. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] About Watir 1.9.0, RAutomation and AutoIt
Hi! I've just written a post about Watir 1.9.0, RAutomation and AutoIt. Maybe it helps someone to make their upgrade process a little easier: http://www.itreallymatters.net/post/6791652065/viva-la-rautomation Jarmo -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: set (variable) issue
Are you converting the amount var into a string before passing it to the .set method? orde On Jun 22, 7:45 am, JohnH ictodo...@gmail.com wrote: I'm reading an integer value from an xls. file and save it in a variable called amount. Afterwards, I'm trying to send that variable value into a text field from a website, but I'm having some problems there. Here is the code: begin sleep 1 counter = counter + 1 browser.text_field(:name, name).set(amount) rescue if counter 10 retry end end If I use a direct value (like 5) instead or the amount variable it all works fine, but when trying in this form the form where the text field starts to change its position in the page :O I've tried as well with .value(variable) instead of .set(variable) but in this case nothing happens - the value is not sent. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Simple popup example for Watir 1.9.0
Thanks for everyone's input. I will proceed with updating the popup section on the wiki. (as time permits) Darryl On Jun 22, 7:36 am, Jarmo Pertman jarm...@gmail.com wrote: something in the lines of if you are using watir version older than 1.9.0, then click here :) Jarmo On Jun 22, 12:50 am, Charley Baker charley.ba...@gmail.com wrote: I wouldn't call it old popup methods but something like watir pre-1.9.0 popup methods. It's more searchable and not as negative. :) -c On Tue, Jun 21, 2011 at 2:24 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Tue, Jun 21, 2011 at 6:31 PM, Darryl Brown d-l-br...@roadrunner.com wrote: My recommendation is that we create a page called old popup methods or something like that and put the old stuff there for some period of time - is this reasonable? Sounds good to me. :) Željko -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Is Firewatir Dead?
From a bit of web research it doesn't look like there is going to be a version of jssh for Firefox 4... Does that mean Firewatir is dead? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Is Firewatir Dead?
personally I prefer watir-webdriver ... Regards -- Tim Koopmans On Thursday, 23 June 2011 at 7:22 AM, Michael wrote: From a bit of web research it doesn't look like there is going to be a version of jssh for Firefox 4... Does that mean Firewatir is dead? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com (mailto:watir-general@googlegroups.com) http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com (mailto:watir-general+unsubscr...@googlegroups.com) -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Donate to Watir
Just started to use Watirhappy to donate to the cause! :) Lisa On Tue, Jun 21, 2011 at 8:32 AM, Željko Filipin zeljko.fili...@wa-research.ch wrote: We have just payed $12 for mapping watir.com to a wordpress.com hosted blog. I would like to thank everybody that already donated to Watir project, and to those that will donate in the future. :) There is donate button at http://watir.com/. We've raised $815 since January 2010. We spend it on hosting and stuff like that. You can see list of donors and Bret's thank you note: http://pledgie.com/campaigns/2982 We have also raised €44,28 via Flattr: https://flattr.com/thing/141470/Watir Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: how to read the object
Thank you for your help.. On 6月17日, 下午11时15分, orde ohil...@gmail.com wrote: Flash isn't supported in watir. There is/was a flashwatir fork, but I'm not sure if it's maintained anymore. On Jun 17, 12:05 am, Jasmine nicely...@hotmail.com wrote: I just start learning the watir,I have a problem about it in the project.Watir doesn't support the tag of the object,so how to read the element,following is html code. object width=80 height=30 type=application/x-shockwave-flash data=/mosicn/script/swf/uploadify.swf id=uploadifyUploader style=visibility: visible -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: how to read the object
I need to read the object tag when I edit the script of my project,but watir doesn't support the tag of the object,so I skip over the step.I just learn watir through my project.So I don't know about some knowledge.Thank you for your help On 6月17日, 下午11时29分, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Jun 17, 2011 at 9:05 AM, Jasmine nicely...@hotmail.com wrote: Watir doesn't support the tag of the object Do you need to do something with the object tag, or do you just need to find out it's attributes? Željko -- watir.com - community manager watir.com/book - author watirpodcast.com - host viaqa.mobi conference on software testing - organizer -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: It doesn't work when clicking a button in Updatepanel
On Jun 20, 3:08 am, Green Yin green...@gmail.com wrote: My web application uses the updatepanel control. See my watir scripts: { ie = Watir::IE.start(url) ie.text_field(:id, txtLogin).set(XXX) ie.text_field(:id, txtPassword).set(xxx) # Without using updatepanel ie.button(:id, btnLogin).click # Using updatepanel ie.button(:id, btnAdd).click } It's no problem when clicking Login button, the page will go to the next page. After clicking btnAdd button, the page just refresh without going to next page. I was tried to use id, name and value of the button to click it, but it's the same result. Does anyone met the problem? Thanks! It might be there is client side javascript that needs to run in order to setup what that button is doing. Watir tries to execute the very next command as soon as the page has finished loading (downloaded the last page element from the webserver) which can be 'too soon' if there is client side javascript that is executing onpageload A good test for that is to execute your script via IRB, pasting in a line at a time. If that works, then it's likely a timing issue, and you may just need to have watir wait a littlle bit (such as with a sleep statement) before script tries to click that second button. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Simple popup example for Watir 1.9.0
On Jun 22, 4:36 am, Jarmo Pertman jarm...@gmail.com wrote: something in the lines of if you are using watir version older than 1.9.0, then click here :) Jarmo +1 -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: href in WebDriver no longer available?
On Jun 21, 1:56 pm, Jari Bakken jari.bak...@gmail.com wrote: On Mon, Jun 20, 2011 at 9:10 PM, BillyMobilly billymobi...@gmail.com wrote: In Watir I used .href in my scripts to navigate to pages. When I run the same script with Watir WebDriver I get an error, seems to indicate that href has been depricated, is that true? Selenium::WebDriver::Error::ObsoleteElementError: Element is no longer valid Nope, not related to href. This message means that the element is no longer present in the DOM. This will happen if the page has been refreshed or navigated away from, or if the element in question has been removed by JavaScript. I'd suggest it might be a good idea to perhaps add a bit more descriptive text to that error to make it a bit more friendly? Maybe something along the lines of Element is no longer present in the DOM (page has been refreshed or navigated away from, or element removed by JavaScript.) -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Need to select a option from a list, with HTML tag as Input
Ivan has the keys here. this is some kind of custom control (not a standard HTML control) which is highly event driven. In this type of control the contents of the DOM can be being altered on the fly by client-side javascript, so it's vital to learn how to use tools such as firebug, or similar developer tools in IE and Chrome. This will let you examine an object (such as these custom listbox options), which will then give you a better handle on it. You likely need to use .click on the element (often a graphic) that makes the list appear then fire events such as onMouseOver and onClick against the element that is rendered in the thing that looks like a select list. On Jun 21, 7:59 am, Ivan Kabluchkov ikabluch...@gmail.com wrote: As I see in your project used gwt-ext There is a complex field of drop-down For select value in this drop-down you should do following actions: 1. Click on down-arrow picture 2. Find appeared div with values of drop-down. In my application I locate it with following code: def get_suggest_box 20.times do |time| div = @browser.div(:class = /x-layer x-combo-list combobox-ext-zindex/, :index = time + 1) return div.div(:index, 1) if div.present? end raise Couldn't find suggest box end I know that 20.times is ugly but it is a quick solution :) 3. Select appropriate value with properly fire events. In my case: def select(text_field, value = nil) suggest_box = get_suggest_box suggest_box.div(:text, value) selected_div.fire_event('onMouseOver') selected_div.fire_event('onClick') end May be it will be helpful for you -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com