[wtr-general] Re: Flex and Flash along with Watir
I am using Melomel with Cucumber and Watir at the moment for Flex/ Flash projects but it might be a little bit outdated and don't think it is being worked on at the moment (have been forking my own copy). On 22 mar, 18:40, Oscar Rieken bis...@gmail.com wrote: I am going to go out on a limb here and say that as far as I know there is no plan for that but there are tools out there that can be used in conjunction with watir to help ease the pain watir + sikuli in jruby seems like a winner for me On Thu, Mar 22, 2012 at 2:35 PM, Max max.s...@gmail.com wrote: It is important to say that Watir CAN NOT control browser plugins like Java applets, Adobe Flash or Microsoft Silverlight. Will that possibly change? Know anyone who is working on the possibilities of controlling plugins? This seems like a huge feature to have. What are the current solutions? Thanks! On Thursday, March 22, 2012 9:15:44 AM UTC-7, Željko Filipin wrote: On Wed, Mar 21, 2012 at 5:58 PM, Max wrote: Are there any updated Flex and Flash ruby gems for Watir? It is important to say that Watir CAN NOT control browser plugins like Java applets, Adobe Flash or Microsoft Silverlight. https://github.com/zeljkofilipin/watirbook/blob/master/about.mdhttps://github.com/zeljkofilipin/watirbook/blob/master/about.md Željko -- watir.com/book - author -- 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] Ang.: Re: Object no longer attached to the DOM error on doing a exists call
Ok, so we are trying to do an exist? call on an element that is shown after clicking a button, which executes some javascript, but it seems like it still is failing for us with this new update to watir-webdriver (it's calling the DOM error in our script). As it is intermittent, perhaps it's more of a timing issue? (as in the script is running before the jquery). Wait_until doesn't really work, but a sleep will do, but as this is bad practice, I would rather see this fixed some other way. Any suggestion here guys? When /^I am selecting (.+) period$/ do |cool_off| on AccountCoolOff do |page| page.cool_off_period_select_value= cool_off page.confrim_cool_off sleep 5 end end Then /^I should see Account Cool Off (\d+) date$/ do |cool_off_date| on AccountCoolOff do |page| wait_until{page.cool_off_submit_link.exists?} @current_date = ((Date.today + cool_off_date.to_i).day).to_s wait_until{@browser.text.include? @current_date} page.cool_off_submit end end -- 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: Interact with Javascript Pop Up
Hi, we have tried both options, the first one doesn't seem to find the popup window when it is invoked by the browser directly, testing xss vulnerability, instead of when invoking it in markup. For example, I am trying this: 1) returned = @browser.alert do @browser.goto('http:// www.url.com/+void(document.cookie=authorization=true)+alert(document.cookie)+') end returned.should == ok # Doing positive test first but it doesn't find the alert box when it is displayed, and it is not working when I am setting the URL outside the block as well. 2) Option two, however, does work, but only for firefox, and I would want it to work for all browsers with watir-webdriver. unless (@browser.driver.switch_to.alert.text.nil?) #raise Javascript popup box is found, malicious code might be able to insert on page end Option one works when it is invoked from a button, but not when javascript is invoked from browser url. Can someone please help me? Best Regards Matt On Mar 3, 3:52 pm, Jari Bakken jari.bak...@gmail.com wrote: On Thu, Mar 3, 2011 at 2:12 PM, Usman Hussain usmanhhuss...@gmail.com wrote: Hi Guys, Im doing a test at the moment where when I enter in something into the url it brings up a Javascript pop up. Now I do not want to turn the pop up function off by writing some Javascript and then using @b.execute_script etc... What I would LIKE to do is to somehow interact with the javascript pop up and click on the button to close it. Is there any way i can do it using the Watir or Webdriver Api or something? The pop up is an ALERT box. I am using a MAC I am using Watir-Webdriver with Cucumber Ruby v1.8.7 any more info please shout. Any help would be awesome. There are two ways to do this: 1. Use watir-webdriver's execute_script hacks: require 'watir-webdriver/extensions/alert' browser.alert do # perform action that triggers alert end Seehttps://github.com/jarib/watir-webdriver/blob/master/spec/alert_spec.rb for more examples. 2. Use WebDriver's alert handling API directly (currently Firefox-only and considered experimental) # perform action that triggers alert browser.driver.switch_to.alert.accept More examples of this herehttp://code.google.com/p/selenium/source/browse/trunk/rb/spec/integra... Jari -- 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: Interact with Javascript Pop Up
On Mar 3, 3:52 pm, Jari Bakken jari.bak...@gmail.com wrote: On Thu, Mar 3, 2011 at 2:12 PM, Usman Hussain usmanhhuss...@gmail.com wrote: Hi Guys, Im doing a test at the moment where when I enter in something into the url it brings up a Javascript pop up. Now I do not want to turn the pop up function off by writing some Javascript and then using @b.execute_script etc... What I would LIKE to do is to somehow interact with the javascript pop up and click on the button to close it. Is there any way i can do it using the Watir or Webdriver Api or something? The pop up is an ALERT box. I am using a MAC I am using Watir-Webdriver with Cucumber Ruby v1.8.7 any more info please shout. Any help would be awesome. There are two ways to do this: 1. Use watir-webdriver's execute_script hacks: require 'watir-webdriver/extensions/alert' browser.alert do # perform action that triggers alert end Seehttps://github.com/jarib/watir-webdriver/blob/master/spec/alert_spec.rb for more examples. 2. Use WebDriver's alert handling API directly (currently Firefox-only and considered experimental) # perform action that triggers alert browser.driver.switch_to.alert.accept More examples of this herehttp://code.google.com/p/selenium/source/browse/trunk/rb/spec/integra... Jari -- 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