[wtr-general] Re: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
Hi Jari, I tried the alert solution after find this on the net: http://stackoverflow.com/questions/3652582/alert-box-in-waitr-webdriver but when i run my script i keep getting the following error: no such file to load -- watir-webdriver/extensions/alerts (LoadError) any ideas why? i would have though if it can require watir-webdriver it should be able to find the watir-webdriver/extensions/alert as well... On Oct 6, 10:42 am, Jari Bakken jari.bak...@gmail.com wrote: What kind of popup? If it was created in JS (i.e. using alert(), confirm() or prompt()), watir-webdriver has an optional require for dealing with these: require watir-webdriver/extensions/alerts Den 6. okt. 2010 kl. 11:28 skrev Ozzi usmanhhuss...@gmail.com: Hi Guys, Im using Watir-WebDriver with firefox on a MAC... Ive searched google and tried a few solutions but am unable to solve my problem... The Issue: I have created a script where there were dialogs appearing. as im using Watir-Webdriver i managed to click on the OK buttons for example by using AutoIT... the code i was writing looked something like this: require 'rubygems' require 'win32ole' require 'watir-webdriver' autoit = WIN32OLE.new('AutoITX3.Control') autoit.WinActivate('button') autoit.Send{'(ENTER)'} This was then hitting the OK button on the javascript popup and i could then continue my script. NOW however i have been given a MAC and my tests are failing at this step... I have taken a look at applescript and am having trouble with getting it to work... i tried to convert the code above to work for applescript and I got this: require 'rubygems' require 'appscript' require 'watir-webdriver' include Applescript app('button').activate app('System Events').key.ENTER BUT this does not seem to work. Is it possible for you to help me out here? do you need any more information? am i requiring the correct gem? etc... any helpto get this done would be much appreciated. Kind regards, Usman Hussain -- 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] Re: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
On Wed, Oct 6, 2010 at 12:52 PM, Ozzi usmanhhuss...@gmail.com wrote: Hi Jari, I tried the alert solution after find this on the net: http://stackoverflow.com/questions/3652582/alert-box-in-waitr-webdriver but when i run my script i keep getting the following error: no such file to load -- watir-webdriver/extensions/alerts (LoadError) Ah, sorry - the extension is not in a gem release yet. I'll do a new gem release soon, which should have the extension. -- 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: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... in the mean time ill try and get applescript working. its always good to have a backup plan. thank you for your help. Kind regards, Usman Hussain On Oct 6, 11:58 am, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 12:52 PM, Ozzi usmanhhuss...@gmail.com wrote: Hi Jari, I tried the alert solution after find this on the net: http://stackoverflow.com/questions/3652582/alert-box-in-waitr-webdriver but when i run my script i keep getting the following error: no such file to load -- watir-webdriver/extensions/alerts (LoadError) Ah, sorry - the extension is not in a gem release yet. I'll do a new gem release soon, which should have the extension. -- 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: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
hey Jari, thank you for the quick update... I just tried to run my test again and the teps prior to getting to the pop up are now failing. im getting a error saying: undefined method `cell' for #Watir::Browser:0x3fd3050 (NoMethodError) this was working before i did a gem update. the line of code that is failing is: @browser.cell(:id = '04939849-aa75-408d-9b1f-c380e7df48ed', :class = 'mgnlNavigation1Cell mgnlNavigationText').click since i did an update this is now failing would you know why? kind regards, usman hussain On Oct 6, 12:37 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
Browser#cell has been removed, as part of cleaning up the table API. Instead you can use: browser.td(:id = ...) browser.th(:id = ...) #cell and #cells are only available on TableRow, and #row and #rows only available on Table and TableSection (tbody, tfoot, thead). You can see the complete revised API here: http://gist.github.com/565553 On Wed, Oct 6, 2010 at 2:23 PM, Ozzi usmanhhuss...@gmail.com wrote: hey Jari, thank you for the quick update... I just tried to run my test again and the teps prior to getting to the pop up are now failing. im getting a error saying: undefined method `cell' for #Watir::Browser:0x3fd3050 (NoMethodError) this was working before i did a gem update. the line of code that is failing is: @browser.cell(:id = '04939849-aa75-408d-9b1f-c380e7df48ed', :class = 'mgnlNavigation1Cell mgnlNavigationText').click since i did an update this is now failing would you know why? kind regards, usman hussain On Oct 6, 12:37 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
ahhh cool... it works. changed it now with the new API... is the link you provided always going to be location of where the api will get updated? kind regards, Usman Hussain On Oct 6, 2:53 pm, Jari Bakken jari.bak...@gmail.com wrote: Browser#cell has been removed, as part of cleaning up the table API. Instead you can use: browser.td(:id = ...) browser.th(:id = ...) #cell and #cells are only available on TableRow, and #row and #rows only available on Table and TableSection (tbody, tfoot, thead). You can see the complete revised API here: http://gist.github.com/565553 On Wed, Oct 6, 2010 at 2:23 PM, Ozzi usmanhhuss...@gmail.com wrote: hey Jari, thank you for the quick update... I just tried to run my test again and the teps prior to getting to the pop up are now failing. im getting a error saying: undefined method `cell' for #Watir::Browser:0x3fd3050 (NoMethodError) this was working before i did a gem update. the line of code that is failing is: @browser.cell(:id = '04939849-aa75-408d-9b1f-c380e7df48ed', :class = 'mgnlNavigation1Cell mgnlNavigationText').click since i did an update this is now failing would you know why? kind regards, usman hussain On Oct 6, 12:37 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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] Re: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
On Wed, Oct 6, 2010 at 4:03 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool... it works. changed it now with the new API... is the link you provided always going to be location of where the api will get updated? No, I've just used it to sketch out what a simpler Table API would look like. Up to date docs for the current master can always be found here: http://rdoc.info/github/jarib/watir-webdriver/master/frames kind regards, Usman Hussain On Oct 6, 2:53 pm, Jari Bakken jari.bak...@gmail.com wrote: Browser#cell has been removed, as part of cleaning up the table API. Instead you can use: browser.td(:id = ...) browser.th(:id = ...) #cell and #cells are only available on TableRow, and #row and #rows only available on Table and TableSection (tbody, tfoot, thead). You can see the complete revised API here: http://gist.github.com/565553 On Wed, Oct 6, 2010 at 2:23 PM, Ozzi usmanhhuss...@gmail.com wrote: hey Jari, thank you for the quick update... I just tried to run my test again and the teps prior to getting to the pop up are now failing. im getting a error saying: undefined method `cell' for #Watir::Browser:0x3fd3050 (NoMethodError) this was working before i did a gem update. the line of code that is failing is: @browser.cell(:id = '04939849-aa75-408d-9b1f-c380e7df48ed', :class = 'mgnlNavigation1Cell mgnlNavigationText').click since i did an update this is now failing would you know why? kind regards, usman hussain On Oct 6, 12:37 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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 -- 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: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
Hi Jari, Ive tried all the solutions (alert, promt confirm) that you stated may work but none of them do. I think the reason for me using AutoIT when i was on a windows box was because it was a windows js pop up dialog box. and i think i was trying to use applescript to replicate the same thing on MAC. i still cant get the pop up boxes to click on the OK button. the examples i gave in the original post are still there so i think im gonna have to do a bit more research on how to get this working on firefox on a MAC... Thanks for your help though. if you know anything like this on the MAC that would be great help. i think its back to square one for me :( kind regards, usman hussain On Oct 6, 3:07 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 4:03 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool... it works. changed it now with the new API... is the link you provided always going to be location of where the api will get updated? No, I've just used it to sketch out what a simpler Table API would look like. Up to date docs for the current master can always be found here: http://rdoc.info/github/jarib/watir-webdriver/master/frames kind regards, Usman Hussain On Oct 6, 2:53 pm, Jari Bakken jari.bak...@gmail.com wrote: Browser#cell has been removed, as part of cleaning up the table API. Instead you can use: browser.td(:id = ...) browser.th(:id = ...) #cell and #cells are only available on TableRow, and #row and #rows only available on Table and TableSection (tbody, tfoot, thead). You can see the complete revised API here: http://gist.github.com/565553 On Wed, Oct 6, 2010 at 2:23 PM, Ozzi usmanhhuss...@gmail.com wrote: hey Jari, thank you for the quick update... I just tried to run my test again and the teps prior to getting to the pop up are now failing. im getting a error saying: undefined method `cell' for #Watir::Browser:0x3fd3050 (NoMethodError) this was working before i did a gem update. the line of code that is failing is: @browser.cell(:id = '04939849-aa75-408d-9b1f-c380e7df48ed', :class = 'mgnlNavigation1Cell mgnlNavigationText').click since i did an update this is now failing would you know why? kind regards, usman hussain On Oct 6, 12:37 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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 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] Re: Using AppleScript with Firefox using Watir-Wbedriver HELP!!!
On Wed, Oct 6, 2010 at 4:51 PM, Ozzi usmanhhuss...@gmail.com wrote: Hi Jari, Ive tried all the solutions (alert, promt confirm) that you stated may work but none of them do. I think the reason for me using AutoIT when i was on a windows box was because it was a windows js pop up dialog box. A windows js pop up dialog box doesn't make sense. How is the dialog created? Who creates it? and i think i was trying to use applescript to replicate the same thing on MAC. i still cant get the pop up boxes to click on the OK button. the examples i gave in the original post are still there so i think im gonna have to do a bit more research on how to get this working on firefox on a MAC... I don't know anything about AppleScript, unfortunately. Thanks for your help though. if you know anything like this on the MAC that would be great help. i think its back to square one for me :( kind regards, usman hussain On Oct 6, 3:07 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 4:03 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool... it works. changed it now with the new API... is the link you provided always going to be location of where the api will get updated? No, I've just used it to sketch out what a simpler Table API would look like. Up to date docs for the current master can always be found here: http://rdoc.info/github/jarib/watir-webdriver/master/frames kind regards, Usman Hussain On Oct 6, 2:53 pm, Jari Bakken jari.bak...@gmail.com wrote: Browser#cell has been removed, as part of cleaning up the table API. Instead you can use: browser.td(:id = ...) browser.th(:id = ...) #cell and #cells are only available on TableRow, and #row and #rows only available on Table and TableSection (tbody, tfoot, thead). You can see the complete revised API here: http://gist.github.com/565553 On Wed, Oct 6, 2010 at 2:23 PM, Ozzi usmanhhuss...@gmail.com wrote: hey Jari, thank you for the quick update... I just tried to run my test again and the teps prior to getting to the pop up are now failing. im getting a error saying: undefined method `cell' for #Watir::Browser:0x3fd3050 (NoMethodError) this was working before i did a gem update. the line of code that is failing is: @browser.cell(:id = '04939849-aa75-408d-9b1f-c380e7df48ed', :class = 'mgnlNavigation1Cell mgnlNavigationText').click since i did an update this is now failing would you know why? kind regards, usman hussain On Oct 6, 12:37 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Oct 6, 2010 at 1:11 PM, Ozzi usmanhhuss...@gmail.com wrote: ahhh cool. brilliant... if you can let me know once this is done that would be brilliant... Done, just released 0.1.0. -- 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 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 -- 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