[wtr-general] Re: Manipulate Keystrokes on a MAC
Hi CJ Romberger, I am running my tests on a MAC and the browser im running them in is Firefox v3.6.10 Not only that but It will also work on Windows as well. what you should try is... Im assuming in your test there is a step where you are clicking a button and then after clicking on a particular button the Javascript popup appears If you put the line: @browser.execute_script('window.alert = function () {};') BEFORE the step where you are clicking the button then what you are actually doing is disabling the javascript alert function just before it will be called... Therefore you can run the rest of you test without the interruption of the Javascript popup. The same or similar logic can also be used for Javascript Confirm and Prompt boxes. In my test i have similar code for Confirm boxes where when the javascript confirm box appears it is always making it true therefore always confirming what it was prompting you to do. Hope this helps... it took me an age to figure out a solution... Kind regards, Usman Hussain On Oct 13, 6:55 pm, CJ Romberger c...@wildwoodinteractive.com wrote: Ozzi, you're using this on your Mac? What browser environment? I have Firefox and Chrome on my Mac, and I'm dead stuck on dismissing Javascript alert boxes. CJ On Wed, Oct 13, 2010 at 10:11 AM, Ozzi usmanhhuss...@gmail.com wrote: thanks for your help guys but i kinda cheated in the end... I kinda wrote some javascript to disable the popup that appears when clicking on one of the button... i wrote: @browser.execute_script('window.alert = function () {};') this then turns off the alert boxes for the window... it works for me and now i can run my scripts on all environments that are available to me... Thanks for all the help guys, Usman Hussain On Oct 12, 1:06 pm, ayan ayan.ni...@gmail.com wrote: You can try using Apple Script. On Mon, Oct 11, 2010 at 2:01 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com wrote: DONT BUY A MAC. As far as I know, a lot of Watir developers use a Mac. (But it looks like nobody has to send keystrokes.) Ž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.comwatir-general%2bunsubscr...@goog legroups.com watir-general%2bunsubscr...@goog legroups.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 -- CJ Romberger Wildwood Interactivehttp://www.wildwoodinteractive.com/ 512.732.9916 PLEASE NOTE: I only check this email address about once a day! If you're a client, the fastest way to reach me is to login to Basecamp, OR email supp...@wildwoodinteractive.com. If you're NOT a client? Why not become one!? :) -- 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: Manipulate Keystrokes on a MAC
thanks for your help guys but i kinda cheated in the end... I kinda wrote some javascript to disable the popup that appears when clicking on one of the button... i wrote: @browser.execute_script('window.alert = function () {};') this then turns off the alert boxes for the window... it works for me and now i can run my scripts on all environments that are available to me... Thanks for all the help guys, Usman Hussain On Oct 12, 1:06 pm, ayan ayan.ni...@gmail.com wrote: You can try using Apple Script. On Mon, Oct 11, 2010 at 2:01 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com wrote: DONT BUY A MAC. As far as I know, a lot of Watir developers use a Mac. (But it looks like nobody has to send keystrokes.) Ž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.comwatir-general%2bunsubscr...@goog legroups.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: Manipulate Keystrokes on a MAC
Ozzi, you're using this on your Mac? What browser environment? I have Firefox and Chrome on my Mac, and I'm dead stuck on dismissing Javascript alert boxes. CJ On Wed, Oct 13, 2010 at 10:11 AM, Ozzi usmanhhuss...@gmail.com wrote: thanks for your help guys but i kinda cheated in the end... I kinda wrote some javascript to disable the popup that appears when clicking on one of the button... i wrote: @browser.execute_script('window.alert = function () {};') this then turns off the alert boxes for the window... it works for me and now i can run my scripts on all environments that are available to me... Thanks for all the help guys, Usman Hussain On Oct 12, 1:06 pm, ayan ayan.ni...@gmail.com wrote: You can try using Apple Script. On Mon, Oct 11, 2010 at 2:01 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com wrote: DONT BUY A MAC. As far as I know, a lot of Watir developers use a Mac. (But it looks like nobody has to send keystrokes.) Ž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.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.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 -- CJ Romberger Wildwood Interactive http://www.wildwoodinteractive.com/ 512.732.9916 PLEASE NOTE: I only check this email address about once a day! If you're a client, the fastest way to reach me is to login to Basecamp, OR email supp...@wildwoodinteractive.com. If you're NOT a client? Why not become one!? :) -- 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: Manipulate Keystrokes on a MAC
You can try using Apple Script. On Mon, Oct 11, 2010 at 2:01 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com wrote: DONT BUY A MAC. As far as I know, a lot of Watir developers use a Mac. (But it looks like nobody has to send keystrokes.) Ž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.comwatir-general%2bunsubscr...@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: Manipulate Keystrokes on a MAC
On Thu, Oct 7, 2010 at 6:35 PM, Eric Mathiesen mathiese...@gmail.com wrote: DONT BUY A MAC. As far as I know, a lot of Watir developers use a Mac. (But it looks like nobody has to send keystrokes.) Ž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
[wtr-general] Re: Manipulate Keystrokes on a MAC
lol.. Thank you for your reply but I was forced to use a MAC... apparently it makes workers more happy at being at work... (please dont ask) ill take a look at linux... thanks for the giving me another idea to look at. On Oct 7, 5:35 pm, Eric Mathiesen mathiese...@gmail.com wrote: I have your solution. DONT BUY A MAC. Go Linux, it's far superior. That being said as Crapple attempts in a lame fashion to follow the *nix realm. Try using some Linux test tools. Can't guarantee they work on a Mac-In-Trash, but here...http://ltp.sourceforge.net/ Linux Test Project. On Thu, Oct 7, 2010 at 9:25 AM, Ethan notet...@gmail.com wrote: well, I'd have posted in the original thread if I had a solution. same is true for everybody else, I suspect, so spamming the same thing repeatedly isn't going to help, regardless of minimally different wording. however, generally, sending keystrokes via the operating system is a poor solution (in my opinion), and much more error-prone than going through the DOM. if it's interacting with a web page that is being problematic, it may be just a question of firing the right events in javascript. not knowing more about the actual problem, it's not possible to get more specific than that, but that is my general, broad advice. On Thu, Oct 7, 2010 at 12:02, saqi saqibowl...@gmail.com wrote: I have a similar problem and have been checking the site for a solution for a few days now and still haven't found anything. I am very eager to find a solution to this problem also. In fact I appreciate Ozzi's eagerness to find a solution by posting the problem in different terms to make it more understandable by more users, therefore increasing his (and others) chance to find a solution. Come on guys, someone must have a solution out there for manipulating keystrokes on a MAC? Ethan - HELP if you don't want no more new posts lol On Oct 7, 4:52 pm, Ethan notet...@gmail.com wrote: if you have more to add, add it to the original thread where you asked. On Thu, Oct 7, 2010 at 11:50, Ozzi usmanhhuss...@gmail.com wrote: Am just trying to see if anyone has a solution or if anyone has ever come across this problem... maybe asking it in a different way will make people understand the question a bit better?... After all this is a forum where people help each other out... On Oct 7, 4:42 pm, Ethan notet...@gmail.com wrote: stop sending the same question to the list over and over. On Thu, Oct 7, 2010 at 10:05, Ozzi usmanhhuss...@gmail.com wrote: Hi Guys, If anyone knows how to manipulate keystrokes on a MAC I would be really grateful if you can tell me how to do this. I need to hit the ENTER and TAB keys on the keyboard. I know I can use AutoIT on windows but am totally lost on how to do this on a MAC. 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.comwatir-general%2bunsubscr...@goog legroups.com watir-general%2bunsubscr...@goog legroups.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.comwatir-general%2bunsubscr...@goog legroups.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.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscribe... -- 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.comwatir-general%2bunsubscr...@goog legroups.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: Manipulate Keystrokes on a MAC
Am just trying to see if anyone has a solution or if anyone has ever come across this problem... maybe asking it in a different way will make people understand the question a bit better?... After all this is a forum where people help each other out... On Oct 7, 4:42 pm, Ethan notet...@gmail.com wrote: stop sending the same question to the list over and over. On Thu, Oct 7, 2010 at 10:05, Ozzi usmanhhuss...@gmail.com wrote: Hi Guys, If anyone knows how to manipulate keystrokes on a MAC I would be really grateful if you can tell me how to do this. I need to hit the ENTER and TAB keys on the keyboard. I know I can use AutoIT on windows but am totally lost on how to do this on a MAC. 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: Manipulate Keystrokes on a MAC
if you have more to add, add it to the original thread where you asked. On Thu, Oct 7, 2010 at 11:50, Ozzi usmanhhuss...@gmail.com wrote: Am just trying to see if anyone has a solution or if anyone has ever come across this problem... maybe asking it in a different way will make people understand the question a bit better?... After all this is a forum where people help each other out... On Oct 7, 4:42 pm, Ethan notet...@gmail.com wrote: stop sending the same question to the list over and over. On Thu, Oct 7, 2010 at 10:05, Ozzi usmanhhuss...@gmail.com wrote: Hi Guys, If anyone knows how to manipulate keystrokes on a MAC I would be really grateful if you can tell me how to do this. I need to hit the ENTER and TAB keys on the keyboard. I know I can use AutoIT on windows but am totally lost on how to do this on a MAC. 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.comwatir-general%2bunsubscr...@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: Manipulate Keystrokes on a MAC
I have a similar problem and have been checking the site for a solution for a few days now and still haven't found anything. I am very eager to find a solution to this problem also. In fact I appreciate Ozzi's eagerness to find a solution by posting the problem in different terms to make it more understandable by more users, therefore increasing his (and others) chance to find a solution. Come on guys, someone must have a solution out there for manipulating keystrokes on a MAC? Ethan - HELP if you don't want no more new posts lol On Oct 7, 4:52 pm, Ethan notet...@gmail.com wrote: if you have more to add, add it to the original thread where you asked. On Thu, Oct 7, 2010 at 11:50, Ozzi usmanhhuss...@gmail.com wrote: Am just trying to see if anyone has a solution or if anyone has ever come across this problem... maybe asking it in a different way will make people understand the question a bit better?... After all this is a forum where people help each other out... On Oct 7, 4:42 pm, Ethan notet...@gmail.com wrote: stop sending the same question to the list over and over. On Thu, Oct 7, 2010 at 10:05, Ozzi usmanhhuss...@gmail.com wrote: Hi Guys, If anyone knows how to manipulate keystrokes on a MAC I would be really grateful if you can tell me how to do this. I need to hit the ENTER and TAB keys on the keyboard. I know I can use AutoIT on windows but am totally lost on how to do this on a MAC. 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.comwatir-general%2bunsubscr...@goog legroups.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: Manipulate Keystrokes on a MAC
well, I'd have posted in the original thread if I had a solution. same is true for everybody else, I suspect, so spamming the same thing repeatedly isn't going to help, regardless of minimally different wording. however, generally, sending keystrokes via the operating system is a poor solution (in my opinion), and much more error-prone than going through the DOM. if it's interacting with a web page that is being problematic, it may be just a question of firing the right events in javascript. not knowing more about the actual problem, it's not possible to get more specific than that, but that is my general, broad advice. On Thu, Oct 7, 2010 at 12:02, saqi saqibowl...@gmail.com wrote: I have a similar problem and have been checking the site for a solution for a few days now and still haven't found anything. I am very eager to find a solution to this problem also. In fact I appreciate Ozzi's eagerness to find a solution by posting the problem in different terms to make it more understandable by more users, therefore increasing his (and others) chance to find a solution. Come on guys, someone must have a solution out there for manipulating keystrokes on a MAC? Ethan - HELP if you don't want no more new posts lol On Oct 7, 4:52 pm, Ethan notet...@gmail.com wrote: if you have more to add, add it to the original thread where you asked. On Thu, Oct 7, 2010 at 11:50, Ozzi usmanhhuss...@gmail.com wrote: Am just trying to see if anyone has a solution or if anyone has ever come across this problem... maybe asking it in a different way will make people understand the question a bit better?... After all this is a forum where people help each other out... On Oct 7, 4:42 pm, Ethan notet...@gmail.com wrote: stop sending the same question to the list over and over. On Thu, Oct 7, 2010 at 10:05, Ozzi usmanhhuss...@gmail.com wrote: Hi Guys, If anyone knows how to manipulate keystrokes on a MAC I would be really grateful if you can tell me how to do this. I need to hit the ENTER and TAB keys on the keyboard. I know I can use AutoIT on windows but am totally lost on how to do this on a MAC. 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.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.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.comwatir-general%2bunsubscr...@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: Manipulate Keystrokes on a MAC
I have your solution. DONT BUY A MAC. Go Linux, it's far superior. That being said as Crapple attempts in a lame fashion to follow the *nix realm. Try using some Linux test tools. Can't guarantee they work on a Mac-In-Trash, but here... http://ltp.sourceforge.net/ Linux Test Project. On Thu, Oct 7, 2010 at 9:25 AM, Ethan notet...@gmail.com wrote: well, I'd have posted in the original thread if I had a solution. same is true for everybody else, I suspect, so spamming the same thing repeatedly isn't going to help, regardless of minimally different wording. however, generally, sending keystrokes via the operating system is a poor solution (in my opinion), and much more error-prone than going through the DOM. if it's interacting with a web page that is being problematic, it may be just a question of firing the right events in javascript. not knowing more about the actual problem, it's not possible to get more specific than that, but that is my general, broad advice. On Thu, Oct 7, 2010 at 12:02, saqi saqibowl...@gmail.com wrote: I have a similar problem and have been checking the site for a solution for a few days now and still haven't found anything. I am very eager to find a solution to this problem also. In fact I appreciate Ozzi's eagerness to find a solution by posting the problem in different terms to make it more understandable by more users, therefore increasing his (and others) chance to find a solution. Come on guys, someone must have a solution out there for manipulating keystrokes on a MAC? Ethan - HELP if you don't want no more new posts lol On Oct 7, 4:52 pm, Ethan notet...@gmail.com wrote: if you have more to add, add it to the original thread where you asked. On Thu, Oct 7, 2010 at 11:50, Ozzi usmanhhuss...@gmail.com wrote: Am just trying to see if anyone has a solution or if anyone has ever come across this problem... maybe asking it in a different way will make people understand the question a bit better?... After all this is a forum where people help each other out... On Oct 7, 4:42 pm, Ethan notet...@gmail.com wrote: stop sending the same question to the list over and over. On Thu, Oct 7, 2010 at 10:05, Ozzi usmanhhuss...@gmail.com wrote: Hi Guys, If anyone knows how to manipulate keystrokes on a MAC I would be really grateful if you can tell me how to do this. I need to hit the ENTER and TAB keys on the keyboard. I know I can use AutoIT on windows but am totally lost on how to do this on a MAC. 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.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@goog legroups.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.comwatir-general%2bunsubscr...@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.comhttp://groups.google.com/group/watir-generalwatir-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.comwatir-general%2bunsubscr...@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