[wtr-general] watir-classic Element#style vs watir-webdriver Element#style
Hey Jarmo or whoever else can help :), In the latest wair-classic the Element#style() method works as follows # return the css style as a string def style assert_exists ole_object.style.cssText end but it still doesn't behave like the webdriver version (which takes a property argument). def style(property = nil) if property assert_exists @element.style property else attribute_value(style).to_s.strip end end It would be really useful if the watir-classic behaviour matched the web driver version. Are there any plans to update this in the future or is there a specfic reason they are different? Thanks thanks thanks, Connor -- 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] Re: Alert window access issue
browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok when I did this it just sets same text_field with first username,then :tab and then password so at last that text field has password and curser doesn't go to next field either. It considers :tab as text and not special key. the alert method in its apis uses send_keys in its set method so I also tried to send :tab from there but same result. On Thu, Oct 25, 2012 at 11:00 PM, RJ rj412@gmail.com wrote: you said 'I tried browser.alert.set :tab but I think you meant, you tried browser.alert.send_keys :tab right? are you asking about browser.send_keys or browser.alert.set? what happens when you do the following? browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok -- 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
Re: [wtr-general] Re: Alert window access issue
What version of WATIR are you using. Correct me if I am wrong, but if you are using pre-3.0 Watir, send_key {TAB} should work... On Friday, October 26, 2012 6:35:38 AM UTC-4, uday swami wrote: browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok when I did this it just sets same text_field with first username,then :tab and then password so at last that text field has password and curser doesn't go to next field either. It considers :tab as text and not special key. the alert method in its apis uses send_keys in its set method so I also tried to send :tab from there but same result. On Thu, Oct 25, 2012 at 11:00 PM, RJ rj41...@gmail.com javascript:wrote: you said 'I tried browser.alert.set :tab but I think you meant, you tried browser.alert.send_keys :tab right? are you asking about browser.send_keys or browser.alert.set? what happens when you do the following? browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com javascript: http://groups.google.com/group/watir-general watir-genera...@googlegroups.com 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
Re: [wtr-general] Re: Alert window access issue
I tried that too but it won't work. See when I try to do same with the main browser window it works it's just won't work with that alert window On Fri, Oct 26, 2012 at 5:51 PM, enroxorz enrique.j.ma...@gmail.com wrote: What version of WATIR are you using. Correct me if I am wrong, but if you are using pre-3.0 Watir, send_key {TAB} should work... On Friday, October 26, 2012 6:35:38 AM UTC-4, uday swami wrote: browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok when I did this it just sets same text_field with first username,then :tab and then password so at last that text field has password and curser doesn't go to next field either. It considers :tab as text and not special key. the alert method in its apis uses send_keys in its set method so I also tried to send :tab from there but same result. On Thu, Oct 25, 2012 at 11:00 PM, RJ rj41...@gmail.com wrote: you said 'I tried browser.alert.set :tab but I think you meant, you tried browser.alert.send_keys :tab right? are you asking about browser.send_keys or browser.alert.set? what happens when you do the following? browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@**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 -- 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] Re: Alert window access issue
I would like to add that the method in alert.rb says @alert.send_keys(value) I tried changing that too but no result On Fri, Oct 26, 2012 at 6:02 PM, uday swami swam...@gmail.com wrote: I tried that too but it won't work. See when I try to do same with the main browser window it works it's just won't work with that alert window On Fri, Oct 26, 2012 at 5:51 PM, enroxorz enrique.j.ma...@gmail.comwrote: What version of WATIR are you using. Correct me if I am wrong, but if you are using pre-3.0 Watir, send_key {TAB} should work... On Friday, October 26, 2012 6:35:38 AM UTC-4, uday swami wrote: browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok when I did this it just sets same text_field with first username,then :tab and then password so at last that text field has password and curser doesn't go to next field either. It considers :tab as text and not special key. the alert method in its apis uses send_keys in its set method so I also tried to send :tab from there but same result. On Thu, Oct 25, 2012 at 11:00 PM, RJ rj41...@gmail.com wrote: you said 'I tried browser.alert.set :tab but I think you meant, you tried browser.alert.send_keys :tab right? are you asking about browser.send_keys or browser.alert.set? what happens when you do the following? browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@**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 -- 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] Re: Alert window access issue
You can also check my related question about this issue on http://stackoverflow.com/questions/12710287/how-to-enter-password-in-a-popup-using-watir On Fri, Oct 26, 2012 at 6:21 PM, uday swami swam...@gmail.com wrote: I would like to add that the method in alert.rb says @alert.send_keys(value) I tried changing that too but no result On Fri, Oct 26, 2012 at 6:02 PM, uday swami swam...@gmail.com wrote: I tried that too but it won't work. See when I try to do same with the main browser window it works it's just won't work with that alert window On Fri, Oct 26, 2012 at 5:51 PM, enroxorz enrique.j.ma...@gmail.comwrote: What version of WATIR are you using. Correct me if I am wrong, but if you are using pre-3.0 Watir, send_key {TAB} should work... On Friday, October 26, 2012 6:35:38 AM UTC-4, uday swami wrote: browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok when I did this it just sets same text_field with first username,then :tab and then password so at last that text field has password and curser doesn't go to next field either. It considers :tab as text and not special key. the alert method in its apis uses send_keys in its set method so I also tried to send :tab from there but same result. On Thu, Oct 25, 2012 at 11:00 PM, RJ rj41...@gmail.com wrote: you said 'I tried browser.alert.set :tab but I think you meant, you tried browser.alert.send_keys :tab right? are you asking about browser.send_keys or browser.alert.set? what happens when you do the following? browser.alert.set username browser.alert.send_key :tab browser.alert.set my_password browser.alert.ok -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-...@googlegroups.com http://groups.google.com/**group/watir-generalhttp://groups.google.com/group/watir-general watir-genera...@**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 -- 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: watir-classic Element#style vs watir-webdriver Element#style
I also ran into this yesterday. There was talk in http://rubyforge.org/pipermail/wtr-development/2012-February/003541.html about fixing watir-classic to be the same. Though it looks like it was not implemented. I think all you would need to do for watir-classic is change the style method to: # return the css style as a string def style(property = nil) assert_exists if property ole_object.currentStyle.send(property) else ole_object.style.cssText end end It would make watir-classic similar to watir-webdriver. Though I think you would get different formats for some of the properties (example 'color'). Justin Ko On Friday, October 26, 2012 6:26:53 AM UTC-4, Connor C wrote: Hey Jarmo or whoever else can help :), In the latest wair-classic the Element#style() method works as follows # return the css style as a string def style assert_exists ole_object.style.cssText end but it still doesn't behave like the webdriver version (which takes a property argument). def style(property = nil) if property assert_exists @element.style property else attribute_value(style).to_s.strip end end It would be really useful if the watir-classic behaviour matched the web driver version. Are there any plans to update this in the future or is there a specfic reason they are different? Thanks thanks thanks, Connor -- 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: [Wtr-development] Classic Element.Style vs Webdriver Element.Style
I don't see any reason why it should not be doable in watir-classic too - didn't know that feature exists in watir-webdriver. Please open up a feature request under https://github.com/watir/watir-classic/issues and i'll try to introduce that in the next version. J. On Fri, Oct 26, 2012 at 1:16 PM, Connor Culleton connor.qa@gmail.comwrote: Hey Jarmo, In the latest wair-classic the element.style() method works as follows # return the css style as a string def style assert_exists ole_object.style.cssText end but it still doesn't behave like the webdriver version (which takes a property argument). def style(property = nil) if property assert_exists @element.style property else attribute_value(style).to_s.strip end end It would be really useful if the watir-classic behaviour matched the web driver version. Are there any plans to update this in the future or is there a specfic reason they are different? Thanks for everything, Connor ___ Wtr-development mailing list wtr-developm...@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- 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: [Wtr-development] Classic Element.Style vs Webdriver Element.Style
Thanks Jarmo, we will raise the request. JFYI both, this is the original discussion around #style() in watir and is the reason we are following up on this: https://github.com/watir/watir-webdriver/issues/11 Thank you, Aliaksandr Ikhelis On Fri, Oct 26, 2012 at 4:18 PM, Jarmo jarm...@gmail.com wrote: I don't see any reason why it should not be doable in watir-classic too - didn't know that feature exists in watir-webdriver. Please open up a feature request under https://github.com/watir/watir-classic/issues and i'll try to introduce that in the next version. J. On Fri, Oct 26, 2012 at 1:16 PM, Connor Culleton connor.qa@gmail.comwrote: Hey Jarmo, In the latest wair-classic the element.style() method works as follows # return the css style as a string def style assert_exists ole_object.style.cssText end but it still doesn't behave like the webdriver version (which takes a property argument). def style(property = nil) if property assert_exists @element.style property else attribute_value(style).to_s.strip end end It would be really useful if the watir-classic behaviour matched the web driver version. Are there any plans to update this in the future or is there a specfic reason they are different? Thanks for everything, Connor ___ Wtr-development mailing list wtr-developm...@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development ___ Wtr-development mailing list wtr-developm...@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-development -- 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: watir-classic Element#style vs watir-webdriver Element#style
Thanks Justin! We've got something similar to what you suggested implemented all ready. I was hoping that classic and webdriver would behave the same way in 4.0. I wonder are the watir guys planning on changing these to match in the future or is there some reason why they are both different? Thanks again, Connor On Friday, 26 October 2012 14:23:48 UTC+1, Justin Ko wrote: I also ran into this yesterday. There was talk in http://rubyforge.org/pipermail/wtr-development/2012-February/003541.htmlabout fixing watir-classic to be the same. Though it looks like it was not implemented. I think all you would need to do for watir-classic is change the style method to: # return the css style as a string def style(property = nil) assert_exists if property ole_object.currentStyle.send(property) else ole_object.style.cssText end end It would make watir-classic similar to watir-webdriver. Though I think you would get different formats for some of the properties (example 'color'). Justin Ko On Friday, October 26, 2012 6:26:53 AM UTC-4, Connor C wrote: Hey Jarmo or whoever else can help :), In the latest wair-classic the Element#style() method works as follows # return the css style as a string def style assert_exists ole_object.style.cssText end but it still doesn't behave like the webdriver version (which takes a property argument). def style(property = nil) if property assert_exists @element.style property else attribute_value(style).to_s.strip end end It would be really useful if the watir-classic behaviour matched the web driver version. Are there any plans to update this in the future or is there a specfic reason they are different? Thanks thanks thanks, Connor -- 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