[wtr-general] Problem with watir (Radio Button)
Hello, i'm working on watir with Internet Explorer, i'm trying to select a radio button using the command ie.radio(:id, "RdUpload").set its not working for me i'm getting the following error. please suggest me a solution to this. Here is the ERROR code displayed. irb(main):031:0> ie.radio(:id, "RdUpload").set Watir::Exception::UnknownObjectException: Unable to locate element, using :id, " RdUpload" from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:52: in `assert_exists' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:284 :in `enabled?' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:56: in `assert_enabled' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:505:in `set' from (irb):31 thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with watir (Radio Button)
yes it is in a frame... On Apr 4, 7:51 pm, Paul Rogers wrote: > that error means that watir couldnt find that raidio button. If you post the > html, we might be able to help you more. Are you sure its not ina frame? > > Paul > > > > On Sat, Apr 4, 2009 at 3:35 AM, spike wrote: > > > Hello, > > > i'm working on watir with Internet Explorer, i'm trying to select a > > radio button using the command > > > ie.radio(:id, "RdUpload").set > > > its not working for me i'm getting the following error. please suggest > > me a solution to this. > > > Here is the ERROR code displayed. > > > irb(main):031:0> ie.radio(:id, "RdUpload").set > > Watir::Exception::UnknownObjectException: Unable to locate element, > > using :id, " > > RdUpload" > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:52: > > in `assert_exists' > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:284 > > :in `enabled?' > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > element.rb:56: > > in `assert_enabled' > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > input_elements > > .rb:505:in `set' > > from (irb):31 > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Watir Recorder++ and Watir
Hello I've installed watir recorder++ and i'm getting an error while playback System.UnauthorizedAccessException: Access to the path "C:\Program Files\WatirRecorder++\temp.rb" is denied. and also i was previously working on watir, after i installed watir recorder++ i'm not able to run watir wat may be the problem. Should i uninstall any in these two? please suggest me some solution. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Watir
Hi The following is the code written for a check list. Supervisor : --Select-- learner2 learner1 learner3 user2 vinay user3 vinay1 user_1 Now if i'm writing the command irb(main):021:0> ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor"). set("vinay") I'm getting the following error Watir::Exception::UnknownObjectException: Unable to locate element, using :id, " ct100_ContentPlaceHolder1_IbISupervisor" from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:52: in `assert_exists' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:63:in `select_item_in_select_list' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:47:in `set' please suggest some solution we user .net technology for developing website. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir
hello sir I used ur solution but its not working i'm getting the following error irb(main):011:0> ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor"). set("Select") Watir::Exception::UnknownObjectException: Unable to locate element, using :id, " ct100_ContentPlaceHolder1_IbISupervisor" from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:52: in `assert_exists' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:63:in `select_item_in_select_list' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ input_elements .rb:47:in `set' On Apr 6, 11:35 am, spike wrote: > Hi > > The following is the code written for a check list. > > align="right"> > class="dataentrylabelsStyle">Supervisor : class="cellInput"> name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor" > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor" > class="stylenormalTextbox"> > value="--Select--">--Select-- > value="learner2">learner2 > value="learner1">learner1 > value="learner3">learner3 > user2 > vinay > user3 > vinay1 > user_1 > > Now if i'm writing the command > irb(main):021:0> ie.select_list(:id, > "ct100_ContentPlaceHolder1_IbISupervisor"). > set("vinay") > > I'm getting the following error > > Watir::Exception::UnknownObjectException: Unable to locate element, > using :id, " > ct100_ContentPlaceHolder1_IbISupervisor" > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > element.rb:52: > in `assert_exists' > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > input_elements > .rb:63:in `select_item_in_select_list' > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > input_elements > .rb:47:in `set' > > please suggest some solution we user .net technology for developing > website. > > thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Where to run the script
Hi I'm using watir tool currently i'm running the script in Command prompt. Is it the right way? or should i run the script in SciTE. Please suggest me a solution. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Where to run the script
i'm not able to run the script from SciTE. I typed in the following script saved it and clicked F5. require 'Watir' include Watir ie = Watir::IE.new ie.goto "http://www.google.com/"; ie.url == "http://www.google.co.in/"; In the output panel I'm getting the following data >ruby startgoogle.rb C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ core_ext/module/introspection.rb:70:in `const_get': no such file to load -- safariwatir (MissingSourceFile) from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/introspection.rb:70:in `local_constants' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/introspection.rb:70:in `each' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/introspection.rb:70:in `local_constants' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/introspection.rb:68:in `each' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/introspection.rb:68:in `local_constants' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/core_ext/module/introspection.rb:86:in `local_constant_names' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:498:in `new_constants_in' from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ active_support/dependencies.rb:495:in `collect' ... 6 levels... from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:82 from startgoogle.rb:3 >Exit code: 1 Is this a error in the application? please suggest me if any installation or any error inthe code i've written On Apr 6, 4:14 pm, Željko Filipin wrote: > On Mon, Apr 6, 2009 at 12:58, spike wrote: > > I'm using watir tool currently i'm running the script in Command > > prompt. Is it the right way? or should i run the script in SciTE. > > I am running Watir scripts from command prompt for years. Works just fine. I > have tried to run them from Scite and Netbeans and they worked there too. At > the end, it is your choice. > > Do you have any problems when running scripts from command prompt or Scite? > > Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir
Ya that's ok, but wat is the script for selecting a value from the list. On Apr 6, 4:02 pm, JArkelen wrote: > You should use "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" as the > id for the select, not the id of the label > > On Apr 6, 12:09 pm, Angrez Singh wrote: > > > > > you are trying to access select_list using id of label. I think watir is > > right in not recognizing the element. Correct? > > > ie.select_list(:id, "ct100_ContentPlaceHolder1_IbISupervisor"). > > > "ct100_ContentPlaceHolder1_IbISupervisor" is ID for span & not select_list. > > As per your HTML code "ctl00_ContentPlaceHolder1_ddlSelectSupervisor" is ID > > for select list so you should try > > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_ddlSelectSupervisor") > > > - Angrez > > > On Mon, Apr 6, 2009 at 3:26 PM, spike wrote: > > > > hello sir > > > > I used ur solution but its not working i'm getting the following error > > > > irb(main):011:0> ie.select_list(:id, > > > "ct100_ContentPlaceHolder1_IbISupervisor"). > > > set("Select") > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > using :id, " > > > ct100_ContentPlaceHolder1_IbISupervisor" > > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > element.rb:52: > > > in `assert_exists' > > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > input_elements > > > .rb:63:in `select_item_in_select_list' > > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > input_elements > > > .rb:47:in `set' > > > > On Apr 6, 11:35 am, spike wrote: > > > > Hi > > > > > The following is the code written for a check list. > > > > > > > > align="right"> > > > > > > > class="dataentrylabelsStyle">Supervisor : > > > class="cellInput"> > > > name="ctl00$ContentPlaceHolder1$ddlSelectSupervisor" > > > > id="ctl00_ContentPlaceHolder1_ddlSelectSupervisor" > > > > class="stylenormalTextbox"> > > > > > > value="--Select--">--Select-- > > > > > > value="learner2">learner2 > > > > > > value="learner1">learner1 > > > > > > value="learner3">learner3 > > > > > > value="user2">user2 > > > > > > value="vinay">vinay > > > > > > value="user3">user3 > > > > > > value="vinay1">vinay1 > > > > > > value="user_1">user_1 > > > > > Now if i'm writing the command > > > > irb(main):021:0> ie.select_list(:id, > > > > "ct100_ContentPlaceHolder1_IbISupervisor"). > > > > set("vinay") > > > > > I'm getting the following error > > > > > Watir::Exception::UnknownObjectException: Unable to locate element, > > > > using :id, " > > > > ct100_ContentPlaceHolder1_IbISupervisor" > > > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > element.rb:52: > > > > in `assert_exists' > > > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > input_elements > > > > .rb:63:in `select_item_in_select_list' > > > > from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ > > > > input_elements > > > > .rb:47:in `set' > > > > > please suggest some solution we user .net technology for developing > > > > website. > > > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Where to run the script
it worked, thanks a lot On Apr 6, 5:05 pm, Angrez Singh wrote: > remove Include Watir line from your file > > - Angrez > > > > On Mon, Apr 6, 2009 at 5:28 PM, spike wrote: > > > i'm not able to run the script from SciTE. I typed in the following > > script saved it and clicked F5. > > require 'Watir' > > include Watir > > ie = Watir::IE.new > > ie.goto "http://www.google.com/"; > > ie.url == "http://www.google.co.in/"; > > > In the output panel I'm getting the following data > > > >ruby startgoogle.rb > > C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/ > > core_ext/module/introspection.rb:70:in `const_get': no such file to > > load -- safariwatir (MissingSourceFile) > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/core_ext/module/introspection.rb:70:in > > `local_constants' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/core_ext/module/introspection.rb:70:in `each' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/core_ext/module/introspection.rb:70:in > > `local_constants' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/core_ext/module/introspection.rb:68:in `each' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/core_ext/module/introspection.rb:68:in > > `local_constants' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/core_ext/module/introspection.rb:86:in > > `local_constant_names' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/dependencies.rb:498:in `new_constants_in' > > from C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/ > > active_support/dependencies.rb:495:in `collect' > > ... 6 levels... > > from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `gem_original_require' > > from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in > > `require' > > from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie.rb:82 > > from startgoogle.rb:3 > > >Exit code: 1 > > > Is this a error in the application? > > please suggest me if any installation or any error inthe code i've > > written > > > On Apr 6, 4:14 pm, Željko Filipin > > wrote: > > > On Mon, Apr 6, 2009 at 12:58, spike wrote: > > > > I'm using watir tool currently i'm running the script in Command > > > > prompt. Is it the right way? or should i run the script in SciTE. > > > > I am running Watir scripts from command prompt for years. Works just > > fine. I > > > have tried to run them from Scite and Netbeans and they worked there too. > > At > > > the end, it is your choice. > > > > Do you have any problems when running scripts from command prompt or > > Scite? > > > > Željko- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Where to run the script
it worked, thanks a lot On Apr 6, 5:07 pm, Željko Filipin wrote: > On Mon, Apr 6, 2009 at 13:58, spike wrote: > > include Watir > > Remove this from your script and try again. > > > no such file to > > load -- safariwatir (MissingSourceFile) > > Not sure how you got this error message. Maybe "include Watir" causes it. > > Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Failing to update gem
Hi I'm trying to update gem using the command gem update but its failing to update and i'm getting following error. ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) ERROR: Failed to build gem native extension. rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib RUBYLIBDI R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib ruby mkrf_conf.rb (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1) call rake --nosearch cl -nologo -MD -Zi -O2b2xg- -G6 -DWIN32 -DRUBY_VERSION=186 -IC:/ Ruby/include -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 - I. -c gl-1 .0-1.1.c (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl) 'cl' is not recognized as an internal or external command, operable program or batch file. rake aborted! Command failed with status (1): [cl -nologo -MD -Zi -O2b2xg- -G6 - DWIN32 ...] (See full trace by running task with --trace) rake aborted! Command failed with status (1): [call rake --nosearch...] (See full trace by running task with --trace) Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby- opengl-0. 60.1 for inspection. Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ gem_make.out please suggest a solution thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Problem with popup window
Hi I'm using the following code for a popup window, ie.button(:text, "Reset").click_no_wait hwnd = ie.enabled_popup(5) if (hwnd) #yeah! a popup popup = WinClicker.new popup.makeWindowActive(hwnd) popup.clickWindowsButton("Windows Internet Explorer", "OK", "30") end but i'm getting the following error C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in `assert_exists': Unable to locate element, using :text, "Reset" (Watir::Exception::UnknownObjectException) from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 284:in `enabled?' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 56:in `assert_enabled' from C:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb: 220:in `click_no_wait' from Learntrack.rb:27 please suggest me any code that handles popup. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Failing to update gem
when i'm using gem update --system it says nothing to update, On Apr 7, 1:22 pm, JArkelen wrote: > If you want to do a general update on all your gems, use gem update -- > system > If you want to update a specific gem use gem update > > Cheers, > John > > On Apr 7, 9:24 am, spike wrote: > > > > > Hi > > > I'm trying to update gem using the command > > > gem update > > > but its failing to update and i'm getting following error. > > > ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError) > > ERROR: Failed to build gem native extension. > > > rake RUBYARCHDIR=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib > > RUBYLIBDI > > R=C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/lib > > ruby mkrf_conf.rb > > (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1) > > call rake --nosearch > > cl -nologo -MD -Zi -O2b2xg- -G6 -DWIN32 -DRUBY_VERSION=186 -IC:/ > > Ruby/include > > -IC:/Ruby/lib/ruby/1.8/i386-mswin32 -IC:/Ruby/lib/ruby/site_ruby/1.8 - > > I. -c gl-1 > > .0-1.1.c > > (in C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ext/gl) > > 'cl' is not recognized as an internal or external command, > > operable program or batch file. > > rake aborted! > > Command failed with status (1): [cl -nologo -MD -Zi -O2b2xg- -G6 - > > DWIN32 ...] > > > (See full trace by running task with --trace) > > rake aborted! > > Command failed with status (1): [call rake --nosearch...] > > > (See full trace by running task with --trace) > > > Gem files will remain installed in C:/Ruby/lib/ruby/gems/1.8/gems/ruby- > > opengl-0. > > 60.1 for inspection. > > Results logged to C:/Ruby/lib/ruby/gems/1.8/gems/ruby-opengl-0.60.1/ > > gem_make.out > > > please suggest a solution > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem with popup window
its not working for me please me some other solution. On Apr 7, 2:22 pm, GJHmf wrote: > Edit: These two lines should have been pasted into the WinClicker > example, not the AutoIt example: > > require 'watir/ie' > require 'watir/contrib/enabled_popup' --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Popup for File downlaods
Hi I'm really confused working with Pop Up's i'm not able to find any solution for it wat ever script i'm trying its not working for me. The following is the script i used for a file downlaod popup prompt_message = "Do you want to open or save this file?" window_title = "File Download" save_dialog = WIN32OLE.new("AutoItX3.Control") sleep 1 save_dialog_obtained = save_dialog.WinWaitActive (window_title,prompt_message, 25) save_dialog.ControlFocus(window_title, prompt_message, "&Save") sleep 1 save_dialog.Send("S") save_dialog.ControlClick(window_title, prompt_message, "&Save") save_dialog.WinSetTitle(window_title, prompt_message, "This is ForTesting" ) saveas_dialog_obtained = save_dialog.WinWait("Save As", "Save&in", 5) sleep 1 path = File.dirname(__FILE__).gsub("/" , "\\" )+ "\\" + fileName save_dialog.ControlSend("Save As", "", "Edit1",path) sleep 4 save_dialog.ControlClick("Save As", "Save &in", "&Save") save_fileAlreadyExists = save_dialog.WinWait("Save As", " ", 5) But it isnt working for me, I have the following doubts Should i run the popup script in seperate file? Should i include the popup script in the Main script itself at the position where popup occurs? Please give me solution to the above problem and also clear my doubts. Suggest me any tutorial for popup which is easy to understand and has good descritpiton about handling popup's. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Handling popups
Hi I'm tried to run Popups_test.rb script but its not working im getting the following error C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- unittests/setup (LoadError) from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from popups_test.rb:4 suggest me a solution thanking yu --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Error in handling popup
Hi I'm woking on windows platform and IE7 using "WATIR" I've used the following code for handling "JavaScript" popup require 'win32ole' wsh WIN32OLE.new('Wscript.Shell') wsh.AppActivate('Windows Internet Explorer') wsh.Sendkeys('{ENTER}') but its not working i'm getting the following error. 1) Error: test_manage_resources(Manageresources): NoMethodError: undefined method `wsh' for # manageresource.rb:24:in `test_manage_resources' Please Please please... give a solution to my problem i'm stuck with handling popup from past 2 days.. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
Thanks sir, the error which i was getting was removed but the script does not handle popups, so please suggest me a script for handling popups. On Apr 8, 8:03 pm, Jim Matthews wrote: > spike, > > The only thing I see right off is that you have: > > wsh WIN32OLE.new('Wscript.Shell') > > My guess is that it should be: > > wsh = WIN32OLE.new('Wscript.Shell') > > That would seem to fit with the error you are getting: > > NoMethodError: undefined method `wsh' for # 0x2b8c4bc> > > Jim > > On Apr 8, 7:26 am, spike wrote: > > > > > Hi > > > I'm woking on windows platform and IE7 using "WATIR" I've used the > > following code for handling "JavaScript" popup > > > require 'win32ole' > > wsh WIN32OLE.new('Wscript.Shell') > > wsh.AppActivate('Windows Internet Explorer') > > wsh.Sendkeys('{ENTER}') > > > but its not working i'm getting the following error. > > 1) Error: > > test_manage_resources(Manageresources): > > NoMethodError: undefined method `wsh' for # > > manageresource.rb:24:in `test_manage_resources' > > > Please Please please... give a solution to my problem i'm stuck with > > handling popup from past 2 days.. > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
Hi Thnaks for the reply but it isnt working for me. On Apr 8, 9:24 pm, George wrote: > I grabbed this code from somebody here...this may work (you'll need to > install AutoIt): > > # Create a file clicker.rb > require 'win32ole' > > begin > autoit = WIN32OLE.new('AutoItX3.Control') > > loop do > autoit.ControlClick("Windows Internet Explorer", '', 'OK') > autoit.ControlClick("Security Information",'', '&Yes') > autoit.ControlClick("Security Alert",'', '&Yes') > sleep(5) > end > > rescue Exception => e > puts e > end > > > > # create another file called clicker_process.rb > > require 'watir' > require 'win32/process' > > @pid = Process.create( > :app_name => 'ruby clicker.rb', #assuming you make the > above script into a file called clicker.rb > :creation_flags => Process::DETACHED_PROCESS > ).process_id > > at_exit{ Process.kill(9,@pid) } > > > > # ...and here's your main script (delete.rb) > > require 'watir' > require 'win32/process' > require 'clicker_process' > > $ie = Watir::IE.attach(:title, /Your Website Title/) > $ie.link(:text, "Delete").click # this will trigger a popup window > > = > > This should automatically handle popups. You can also expand the list > to include other window title aside from 'Windows Internet Explorer', > 'Security Information' and 'Security Alert'. Hope this helps! > > -George > > On Apr 8, 5:26 am, spike wrote: > > > > > Hi > > > I'm woking on windows platform and IE7 using "WATIR" I've used the > > following code for handling "JavaScript" popup > > > require 'win32ole' > > wsh WIN32OLE.new('Wscript.Shell') > > wsh.AppActivate('Windows Internet Explorer') > > wsh.Sendkeys('{ENTER}') > > > but its not working i'm getting the following error. > > 1) Error: > > test_manage_resources(Manageresources): > > NoMethodError: undefined method `wsh' for # > > manageresource.rb:24:in `test_manage_resources' > > > Please Please please... give a solution to my problem i'm stuck with > > handling popup from past 2 days.. > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
Hi thanks for the reply, i've installed autoIT-v3 software but its not working. On Apr 9, 8:40 am, kiran yajamanyam wrote: > hi, > > handle the popup window using autoit. > install autoit software. and use the followinf code > > autoit = WIN32OLE.new('AutoItX3.Control') > Opt("WinTitleMatchMode", 3) > autoit.WinWait('Windows Internet Explorer', '', 2) > > autoit.WinActivate('Windows Internet Explorer') > autoit.Send('{enter}') > > This will work fine with out any issue > > Regards, > Kiran Y > > > > On Wed, Apr 8, 2009 at 5:56 PM, spike wrote: > > > Hi > > > I'm woking on windows platform and IE7 using "WATIR" I've used the > > following code for handling "JavaScript" popup > > > require 'win32ole' > > wsh WIN32OLE.new('Wscript.Shell') > > wsh.AppActivate('Windows Internet Explorer') > > wsh.Sendkeys('{ENTER}') > > > but its not working i'm getting the following error. > > 1) Error: > > test_manage_resources(Manageresources): > > NoMethodError: undefined method `wsh' for # > > manageresource.rb:24:in `test_manage_resources' > > > Please Please please... give a solution to my problem i'm stuck with > > handling popup from past 2 days.. > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
I used this code but i'm getting the following error 1) Error: test_manage_resources(Manageresources): NoMethodError: undefined method `Opt' for # manageresource.rb:25:in `test_manage_resources' so please suggest some solution... On Apr 9, 8:40 am, kiran yajamanyam wrote: > hi, > > handle the popup window using autoit. > install autoit software. and use the followinf code > > autoit = WIN32OLE.new('AutoItX3.Control') > Opt("WinTitleMatchMode", 3) > autoit.WinWait('Windows Internet Explorer', '', 2) > > autoit.WinActivate('Windows Internet Explorer') > autoit.Send('{enter}') > > This will work fine with out any issue > > Regards, > Kiran Y > > > > On Wed, Apr 8, 2009 at 5:56 PM, spike wrote: > > > Hi > > > I'm woking on windows platform and IE7 using "WATIR" I've used the > > following code for handling "JavaScript" popup > > > require 'win32ole' > > wsh WIN32OLE.new('Wscript.Shell') > > wsh.AppActivate('Windows Internet Explorer') > > wsh.Sendkeys('{ENTER}') > > > but its not working i'm getting the following error. > > 1) Error: > > test_manage_resources(Manageresources): > > NoMethodError: undefined method `wsh' for # > > manageresource.rb:24:in `test_manage_resources' > > > Please Please please... give a solution to my problem i'm stuck with > > handling popup from past 2 days.. > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Handling popups using watir
Hi Can somebody please help me with handling popups using Watir i'm stuck with this. I tried many suggestions but it didnt help me. I'm working on Windows XP and Internet Explorer 7. somebody suggested me to install autoIt for handling popups so i've installed autoIT-v3 also. please please.. help me to handle popups like file download and javascript thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
Ya it still didnt work for me Test Scenario I'm running on windows platform with IE7 I've to upload a file to the application i'm testing. to do that i'm login to the application and navigating to the respective page where i've to upload the file. I'm able to upload the file, upon successfully uploading the fiel a POPUP appears with the msg "FILE UPLOADED SUCCESSFULLY" and it has a button "OK" which has to clicked for the popup to disappear. i'm stuck here. the code is not clicking the "OK" button. following is the script i'm running. require 'Watir' require 'test/unit' class Manageresources < Test::Unit::TestCase def test_manage_resources ie = Watir::IE.start "http://192.168.25.10:215/"; ie.maximize() ie.text_field(:name, "Login1$UserName").set("vinay") ie.text_field(:name, "Login1$Password").set("welcome") ie.checkbox(:name, "Login1$RememberMe").click ie.button(:value, "Log In").click ie.link(:href, "http://192.168.25.10:215/administrator/ Default.aspx").click ie.link(:href, "javascript:__doPostBack ('ctl00$Menu1','Resources')").click ie.link(:href, "http://192.168.25.10:215/admin/ ManageResources.aspx").click ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ \BCSBI.zip") ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click # For handling popups require 'win32ole' autoit = WIN32OLE.new('AutoItX3.Control') # Opt("WinTitleMatchMode", 3) autoit.WinWait('Windows Internet Explorer', '', 2) autoit.WinActivate('Windows Internet Explorer') autoit.Send('{~}') if ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? puts "IS FEEDBACK option Yes is selected" else ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click end ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set ("Public") ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") end end Please suggest me a solution thankingyou On Apr 9, 9:24 am, kiran yajamanyam wrote: > missed this piece of code > > require 'win32ole' > > still if it wont work just comment out Opt("WinTitleMatchMode", 3) code and > try. > > If still it wont work please send me the scenario u are testing i will try > and give u the code. > > Regards, > Kiran Y > > > > On Thu, Apr 9, 2009 at 9:26 AM, spike wrote: > > > I used this code but i'm getting the following error > > > 1) Error: > > test_manage_resources(Manageresources): > > NoMethodError: undefined method `Opt' for # > > manageresource.rb:25:in `test_manage_resources' > > > so please suggest some solution... > > > On Apr 9, 8:40 am, kiran yajamanyam wrote: > > > hi, > > > > handle the popup window using autoit. > > > install autoit software. and use the followinf code > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > Opt("WinTitleMatchMode", 3) > > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > > autoit.WinActivate('Windows Internet Explorer') > > > autoit.Send('{enter}') > > > > This will work fine with out any issue > > > > Regards, > > > Kiran Y > > > > On Wed, Apr 8, 2009 at 5:56 PM, spike wrote: > > > > > Hi > > > > > I'm woking on windows platform and IE7 using "WATIR" I've used the > > > > following code for handling "JavaScript" popup > > > > > require 'win32ole' > > > > wsh WIN32OLE.new('Wscript.Shell') > > > > wsh.AppActivate('Windows Internet Explorer') > > > > wsh.Sendkeys('{ENTER}') > > > > > but its not working i'm getting the following error. > > > > 1) Error: > > > > test_manage_resources(Manageresources): > > > > NoMethodError: undefined method `wsh' for # > > > > manageresource.rb:24:in `test_manage_resources' > > > > > Please Please please... give a solution to my problem i'm stuck with > > > > handling popup from past 2 days.. > > > > > thankingyou- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
if i'm clicking the "OK" button manually its going further to do rest of the operations or els its hung with the popup On Apr 9, 10:38 am, kiran yajamanyam wrote: > You have to give the exact caption of the window which is appearing as > popup. In your case that caption of the pop up is "FILE > UPLOADED SUCCESSFULLY" try this code: > > autoit = WIN32OLE.new('AutoItX3.Control') > Opt("WinTitleMatchMode", 3) > autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2) > > autoit.WinActivate('FILE UPLOADED SUCCESSFULLY') > autoit.Send('{enter}') > > if you are online in g-talk you can ping me. > > Regards, > Kiran Y > kiranyajaman...@gmail.com > > > > On Thu, Apr 9, 2009 at 11:02 AM, spike wrote: > > > Ya it still didnt work for me > > > Test Scenario > > > I'm running on windows platform with IE7 > > I've to upload a file to the application i'm testing. to do that i'm > > login to the application and navigating to the respective page where > > i've to upload the file. I'm able to upload the file, upon > > successfully uploading the fiel a POPUP appears with the msg "FILE > > UPLOADED SUCCESSFULLY" and it has a button "OK" which has to clicked > > for the popup to disappear. i'm stuck here. the code is not clicking > > the "OK" button. following is the script i'm running. > > > require 'Watir' > > require 'test/unit' > > > class Manageresources < Test::Unit::TestCase > > > def test_manage_resources > > ie = Watir::IE.start "http://192.168.25.10:215/"; > > ie.maximize() > > ie.text_field(:name, "Login1$UserName").set("vinay") > > ie.text_field(:name, "Login1$Password").set("welcome") > > ie.checkbox(:name, "Login1$RememberMe").click > > ie.button(:value, "Log In").click > > ie.link(:href, "http://192.168.25.10:215/administrator/ > > Default.aspx").click > > ie.link(:href, "javascript:__doPostBack > > ('ctl00$Menu1','Resources')").click > > ie.link(:href, "http://192.168.25.10:215/admin/ > > ManageResources.aspx").click > > ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click > > ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click > > ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ > > \BCSBI.zip") > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click > > # For handling popups > > require 'win32ole' > > autoit = WIN32OLE.new('AutoItX3.Control') > > # Opt("WinTitleMatchMode", 3) > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > autoit.WinActivate('Windows Internet Explorer') > > autoit.Send('{~}') > > > if ie.radio(:id, > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? > > puts "IS FEEDBACK option Yes is selected" > > else > > ie.radio(:id, > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click > > end > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set > > ("Public") > > ie.select_list(:id, > > "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") > > > end > > end > > > Please suggest me a solution > > > thankingyou > > > On Apr 9, 9:24 am, kiran yajamanyam wrote: > > > missed this piece of code > > > > require 'win32ole' > > > > still if it wont work just comment out Opt("WinTitleMatchMode", 3) code > > and > > > try. > > > > If still it wont work please send me the scenario u are testing i will > > try > > > and give u the code. > > > > Regards, > > > Kiran Y > > > > On Thu, Apr 9, 2009 at 9:26 AM, spike wrote: > > > > > I used this code but i'm getting the following error > > > > > 1) Error: > > > > test_manage_resources(Manageresources): > > > > NoMethodError: undefined method `Opt' for # > > > > manageresource.rb:25:in `test_manage_resources' > > > > > so please suggest some solution... > > > > > On Apr 9, 8:40 am, kiran yajamanyam wrote: > > > > > hi, > >
[wtr-general] Re: Error in handling popup
i didnt get u the popup window title is "Windows Internet Explorer" and the msg displayed in it is File Uploaded Successfully" which one should i use inthe code.. On Apr 9, 10:38 am, kiran yajamanyam wrote: > You have to give the exact caption of the window which is appearing as > popup. In your case that caption of the pop up is "FILE > UPLOADED SUCCESSFULLY" try this code: > > autoit = WIN32OLE.new('AutoItX3.Control') > Opt("WinTitleMatchMode", 3) > autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2) > > autoit.WinActivate('FILE UPLOADED SUCCESSFULLY') > autoit.Send('{enter}') > > if you are online in g-talk you can ping me. > > Regards, > Kiran Y > kiranyajaman...@gmail.com > > > > On Thu, Apr 9, 2009 at 11:02 AM, spike wrote: > > > Ya it still didnt work for me > > > Test Scenario > > > I'm running on windows platform with IE7 > > I've to upload a file to the application i'm testing. to do that i'm > > login to the application and navigating to the respective page where > > i've to upload the file. I'm able to upload the file, upon > > successfully uploading the fiel a POPUP appears with the msg "FILE > > UPLOADED SUCCESSFULLY" and it has a button "OK" which has to clicked > > for the popup to disappear. i'm stuck here. the code is not clicking > > the "OK" button. following is the script i'm running. > > > require 'Watir' > > require 'test/unit' > > > class Manageresources < Test::Unit::TestCase > > > def test_manage_resources > > ie = Watir::IE.start "http://192.168.25.10:215/"; > > ie.maximize() > > ie.text_field(:name, "Login1$UserName").set("vinay") > > ie.text_field(:name, "Login1$Password").set("welcome") > > ie.checkbox(:name, "Login1$RememberMe").click > > ie.button(:value, "Log In").click > > ie.link(:href, "http://192.168.25.10:215/administrator/ > > Default.aspx").click > > ie.link(:href, "javascript:__doPostBack > > ('ctl00$Menu1','Resources')").click > > ie.link(:href, "http://192.168.25.10:215/admin/ > > ManageResources.aspx").click > > ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click > > ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click > > ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ > > \BCSBI.zip") > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click > > # For handling popups > > require 'win32ole' > > autoit = WIN32OLE.new('AutoItX3.Control') > > # Opt("WinTitleMatchMode", 3) > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > autoit.WinActivate('Windows Internet Explorer') > > autoit.Send('{~}') > > > if ie.radio(:id, > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? > > puts "IS FEEDBACK option Yes is selected" > > else > > ie.radio(:id, > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click > > end > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set > > ("Public") > > ie.select_list(:id, > > "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") > > > end > > end > > > Please suggest me a solution > > > thankingyou > > > On Apr 9, 9:24 am, kiran yajamanyam wrote: > > > missed this piece of code > > > > require 'win32ole' > > > > still if it wont work just comment out Opt("WinTitleMatchMode", 3) code > > and > > > try. > > > > If still it wont work please send me the scenario u are testing i will > > try > > > and give u the code. > > > > Regards, > > > Kiran Y > > > > On Thu, Apr 9, 2009 at 9:26 AM, spike wrote: > > > > > I used this code but i'm getting the following error > > > > > 1) Error: > > > > test_manage_resources(Manageresources): > > > > NoMethodError: undefined method `Opt' for # > > > > manageresource.rb:25:in `test_manage_resources' > > > > > so please suggest some solution... > > > > > On Apr 9, 8:40 am, kiran yajamanyam wr
[wtr-general] Re: Error in handling popup
sorry chat is disabled in my company... On Apr 9, 10:38 am, kiran yajamanyam wrote: > You have to give the exact caption of the window which is appearing as > popup. In your case that caption of the pop up is "FILE > UPLOADED SUCCESSFULLY" try this code: > > autoit = WIN32OLE.new('AutoItX3.Control') > Opt("WinTitleMatchMode", 3) > autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2) > > autoit.WinActivate('FILE UPLOADED SUCCESSFULLY') > autoit.Send('{enter}') > > if you are online in g-talk you can ping me. > > Regards, > Kiran Y > kiranyajaman...@gmail.com > > > > On Thu, Apr 9, 2009 at 11:02 AM, spike wrote: > > > Ya it still didnt work for me > > > Test Scenario > > > I'm running on windows platform with IE7 > > I've to upload a file to the application i'm testing. to do that i'm > > login to the application and navigating to the respective page where > > i've to upload the file. I'm able to upload the file, upon > > successfully uploading the fiel a POPUP appears with the msg "FILE > > UPLOADED SUCCESSFULLY" and it has a button "OK" which has to clicked > > for the popup to disappear. i'm stuck here. the code is not clicking > > the "OK" button. following is the script i'm running. > > > require 'Watir' > > require 'test/unit' > > > class Manageresources < Test::Unit::TestCase > > > def test_manage_resources > > ie = Watir::IE.start "http://192.168.25.10:215/"; > > ie.maximize() > > ie.text_field(:name, "Login1$UserName").set("vinay") > > ie.text_field(:name, "Login1$Password").set("welcome") > > ie.checkbox(:name, "Login1$RememberMe").click > > ie.button(:value, "Log In").click > > ie.link(:href, "http://192.168.25.10:215/administrator/ > > Default.aspx").click > > ie.link(:href, "javascript:__doPostBack > > ('ctl00$Menu1','Resources')").click > > ie.link(:href, "http://192.168.25.10:215/admin/ > > ManageResources.aspx").click > > ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click > > ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click > > ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ > > \BCSBI.zip") > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click > > # For handling popups > > require 'win32ole' > > autoit = WIN32OLE.new('AutoItX3.Control') > > # Opt("WinTitleMatchMode", 3) > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > autoit.WinActivate('Windows Internet Explorer') > > autoit.Send('{~}') > > > if ie.radio(:id, > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? > > puts "IS FEEDBACK option Yes is selected" > > else > > ie.radio(:id, > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click > > end > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set > > ("Public") > > ie.select_list(:id, > > "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") > > > end > > end > > > Please suggest me a solution > > > thankingyou > > > On Apr 9, 9:24 am, kiran yajamanyam wrote: > > > missed this piece of code > > > > require 'win32ole' > > > > still if it wont work just comment out Opt("WinTitleMatchMode", 3) code > > and > > > try. > > > > If still it wont work please send me the scenario u are testing i will > > try > > > and give u the code. > > > > Regards, > > > Kiran Y > > > > On Thu, Apr 9, 2009 at 9:26 AM, spike wrote: > > > > > I used this code but i'm getting the following error > > > > > 1) Error: > > > > test_manage_resources(Manageresources): > > > > NoMethodError: undefined method `Opt' for # > > > > manageresource.rb:25:in `test_manage_resources' > > > > > so please suggest some solution... > > > > > On Apr 9, 8:40 am, kiran yajamanyam wrote: > > > > > hi, > > > > > > handle the popup window using autoit. > > > > > install auto
[wtr-general] Re: Error in handling popup
use "space" i didnt get this..one On Apr 9, 10:48 am, kiran yajamanyam wrote: > You should use the caption only. Means "Windows Internet Explorer" only. Use > "space" than "enter" > > > > On Thu, Apr 9, 2009 at 11:16 AM, spike wrote: > > > i didnt get u > > the popup window title is "Windows Internet Explorer" and the msg > > displayed in it is File Uploaded Successfully" > > which one should i use inthe code.. > > > On Apr 9, 10:38 am, kiran yajamanyam > > wrote: > > > You have to give the exact caption of the window which is appearing as > > > popup. In your case that caption of the pop up is "FILE > > > UPLOADED SUCCESSFULLY" try this code: > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > Opt("WinTitleMatchMode", 3) > > > autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2) > > > > autoit.WinActivate('FILE UPLOADED SUCCESSFULLY') > > > autoit.Send('{enter}') > > > > if you are online in g-talk you can ping me. > > > > Regards, > > > Kiran Y > > > kiranyajaman...@gmail.com > > > > On Thu, Apr 9, 2009 at 11:02 AM, spike wrote: > > > > > Ya it still didnt work for me > > > > > Test Scenario > > > > > I'm running on windows platform with IE7 > > > > I've to upload a file to the application i'm testing. to do that i'm > > > > login to the application and navigating to the respective page where > > > > i've to upload the file. I'm able to upload the file, upon > > > > successfully uploading the fiel a POPUP appears with the msg "FILE > > > > UPLOADED SUCCESSFULLY" and it has a button "OK" which has to clicked > > > > for the popup to disappear. i'm stuck here. the code is not clicking > > > > the "OK" button. following is the script i'm running. > > > > > require 'Watir' > > > > require 'test/unit' > > > > > class Manageresources < Test::Unit::TestCase > > > > > def test_manage_resources > > > > ie = Watir::IE.start "http://192.168.25.10:215/"; > > > > ie.maximize() > > > > ie.text_field(:name, "Login1$UserName").set("vinay") > > > > ie.text_field(:name, "Login1$Password").set("welcome") > > > > ie.checkbox(:name, "Login1$RememberMe").click > > > > ie.button(:value, "Log In").click > > > > ie.link(:href, "http://192.168.25.10:215/administrator/ > > > > Default.aspx").click > > > > ie.link(:href, "javascript:__doPostBack > > > > ('ctl00$Menu1','Resources')").click > > > > ie.link(:href, "http://192.168.25.10:215/admin/ > > > > ManageResources.aspx").click > > > > ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click > > > > ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click > > > > ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click > > > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ > > > > \BCSBI.zip") > > > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click > > > > # For handling popups > > > > require 'win32ole' > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > > # Opt("WinTitleMatchMode", 3) > > > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > > > autoit.WinActivate('Windows Internet Explorer') > > > > autoit.Send('{~}') > > > > > if ie.radio(:id, > > > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? > > > > puts "IS FEEDBACK option Yes is selected" > > > > else > > > > ie.radio(:id, > > > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click > > > > end > > > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set > > > > ("Public") > > > > ie.select_list(:id, > > > > "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") > > > > > end > > > > end > > > > > Please suggest me a solution >
[wtr-general] Re: Handling popups using watir
ya but the solutions are not working for me. On Apr 9, 10:35 am, George wrote: > Didn't you just make a thread about this? > > On Apr 8, 9:23 pm, spike wrote: > > > > > Hi > > > Can somebody please help me with handling popups using Watir i'm stuck > > with this. I tried many suggestions but it didnt help me. > > > I'm working on Windows XP and Internet Explorer 7. > > somebody suggested me to install autoIt for handling popups so i've > > installed autoIT-v3 also. > > > please please.. help me to handle popups like file download and > > javascript > > > thankingyou- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
Sorry sir even it is not working i've to click it manually to go further in my test. wat about this autoit i've installed autoit-v3 how is it related to watir..? On Apr 9, 10:43 am, kiran yajamanyam wrote: > make sure that ur caption is same (Including caps) and if > autoit.Send({'enter'}) is not working try with autoit.Send({'space'}) > > > > On Thu, Apr 9, 2009 at 11:10 AM, spike wrote: > > > if i'm clicking the "OK" button manually its going further to do rest > > of the operations or els its hung with the popup > > > On Apr 9, 10:38 am, kiran yajamanyam > > wrote: > > > You have to give the exact caption of the window which is appearing as > > > popup. In your case that caption of the pop up is "FILE > > > UPLOADED SUCCESSFULLY" try this code: > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > Opt("WinTitleMatchMode", 3) > > > autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2) > > > > autoit.WinActivate('FILE UPLOADED SUCCESSFULLY') > > > autoit.Send('{enter}') > > > > if you are online in g-talk you can ping me. > > > > Regards, > > > Kiran Y > > > kiranyajaman...@gmail.com > > > > On Thu, Apr 9, 2009 at 11:02 AM, spike wrote: > > > > > Ya it still didnt work for me > > > > > Test Scenario > > > > > I'm running on windows platform with IE7 > > > > I've to upload a file to the application i'm testing. to do that i'm > > > > login to the application and navigating to the respective page where > > > > i've to upload the file. I'm able to upload the file, upon > > > > successfully uploading the fiel a POPUP appears with the msg "FILE > > > > UPLOADED SUCCESSFULLY" and it has a button "OK" which has to clicked > > > > for the popup to disappear. i'm stuck here. the code is not clicking > > > > the "OK" button. following is the script i'm running. > > > > > require 'Watir' > > > > require 'test/unit' > > > > > class Manageresources < Test::Unit::TestCase > > > > > def test_manage_resources > > > > ie = Watir::IE.start "http://192.168.25.10:215/"; > > > > ie.maximize() > > > > ie.text_field(:name, "Login1$UserName").set("vinay") > > > > ie.text_field(:name, "Login1$Password").set("welcome") > > > > ie.checkbox(:name, "Login1$RememberMe").click > > > > ie.button(:value, "Log In").click > > > > ie.link(:href, "http://192.168.25.10:215/administrator/ > > > > Default.aspx").click > > > > ie.link(:href, "javascript:__doPostBack > > > > ('ctl00$Menu1','Resources')").click > > > > ie.link(:href, "http://192.168.25.10:215/admin/ > > > > ManageResources.aspx").click > > > > ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click > > > > ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click > > > > ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click > > > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ > > > > \BCSBI.zip") > > > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click > > > > # For handling popups > > > > require 'win32ole' > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > > # Opt("WinTitleMatchMode", 3) > > > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > > > autoit.WinActivate('Windows Internet Explorer') > > > > autoit.Send('{~}') > > > > > if ie.radio(:id, > > > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? > > > > puts "IS FEEDBACK option Yes is selected" > > > > else > > > > ie.radio(:id, > > > > "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click > > > > end > > > > ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set > > > > ("Public") > > > > ie.select_list(:id, > > > > "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") > > > > > end
[wtr-general] Re: Error in handling popup
Yes i've used the click() method. On Apr 9, 11:09 am, kiran yajamanyam wrote: > Now I got the problem you are facing. I think in your code u would have used > click() method just before the code to handle popup. If this is the case , > script would not be coming out of click() method and go to next step. This > happens in a case when when used click method and if a popup appears after > click. > > please let me know if you have this issue. I have a work arround where in u > need to extend your element class. > > You can ping me at kiranyajaman...@gmail.com if you have any issues with > this. Try the following code once: > > Copy paste this code and use it. Check if its due to timing issue. > > require 'win32ole' > > autoit = WIN32OLE.new('AutoItX3.Control') > > autoit.WinWait('Windows Internet Explorer', '', 2) > > autoit.WinActivate('Windows Internet Explorer') > autoit.Send('{space}') > > Regards, > Kiran Y > > > > On Thu, Apr 9, 2009 at 11:29 AM, spike wrote: > > > Sorry sir even it is not working i've to click it manually to go > > further in my test. wat about this autoit i've installed autoit-v3 how > > is it related to watir..? > > > On Apr 9, 10:43 am, kiran yajamanyam > > wrote: > > > make sure that ur caption is same (Including caps) and if > > > autoit.Send({'enter'}) is not working try with autoit.Send({'space'}) > > > > On Thu, Apr 9, 2009 at 11:10 AM, spike wrote: > > > > > if i'm clicking the "OK" button manually its going further to do rest > > > > of the operations or els its hung with the popup > > > > > On Apr 9, 10:38 am, kiran yajamanyam > > > > wrote: > > > > > You have to give the exact caption of the window which is appearing > > as > > > > > popup. In your case that caption of the pop up is "FILE > > > > > UPLOADED SUCCESSFULLY" try this code: > > > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > > > Opt("WinTitleMatchMode", 3) > > > > > autoit.WinWait('FILE UPLOADED SUCCESSFULLY', '', 2) > > > > > > autoit.WinActivate('FILE UPLOADED SUCCESSFULLY') > > > > > autoit.Send('{enter}') > > > > > > if you are online in g-talk you can ping me. > > > > > > Regards, > > > > > Kiran Y > > > > > kiranyajaman...@gmail.com > > > > > > On Thu, Apr 9, 2009 at 11:02 AM, spike > > wrote: > > > > > > > Ya it still didnt work for me > > > > > > > Test Scenario > > > > > > > I'm running on windows platform with IE7 > > > > > > I've to upload a file to the application i'm testing. to do that > > i'm > > > > > > login to the application and navigating to the respective page > > where > > > > > > i've to upload the file. I'm able to upload the file, upon > > > > > > successfully uploading the fiel a POPUP appears with the msg "FILE > > > > > > UPLOADED SUCCESSFULLY" and it has a button "OK" which has to > > clicked > > > > > > for the popup to disappear. i'm stuck here. the code is not > > clicking > > > > > > the "OK" button. following is the script i'm running. > > > > > > > require 'Watir' > > > > > > require 'test/unit' > > > > > > > class Manageresources < Test::Unit::TestCase > > > > > > > def test_manage_resources > > > > > > ie = Watir::IE.start "http://192.168.25.10:215/"; > > > > > > ie.maximize() > > > > > > ie.text_field(:name, "Login1$UserName").set("vinay") > > > > > > ie.text_field(:name, "Login1$Password").set("welcome") > > > > > > ie.checkbox(:name, "Login1$RememberMe").click > > > > > > ie.button(:value, "Log In").click > > > > > > ie.link(:href, "http://192.168.25.10:215/administrator/ > > > > > > Default.aspx").click > > > > > > ie.link(:href, "javascript:__doPostBack > > > > > > ('ctl00$Menu1','Resources')").click > > > > > > ie.link(:href, "http://192.168.25.10:215/admin/ >
[wtr-general] Re: Handling popups using watir
I'm really sorry, i've tried many things in the code but couldn get a solution from past 3 days. I've stuck in handling this popups. so please dont mind, i apologise for it. On Apr 9, 11:14 am, George wrote: > What about this neat little script? > > ie = Watir::IE.attach(/Watir General/) > ie.text_field(:name, "q").set "popups" > ie.button(:name, "qt_g").click > > Seriously, though...part of the learning process is doing the > research. You can't expect that an entirely new set of Watir users > are going to magically appear just because you started a duplicate > thread in the same day. I've been finding that the "trial and error" > approach to solving my scripting problems helps me develop more. You > really shouldn't take advantage of people who are really trying to > help you. > > On Apr 8, 10:55 pm, spike wrote: > > > > > ya but the solutions are not working for me. > > > On Apr 9, 10:35 am, George wrote: > > > > Didn't you just make a thread about this? > > > > On Apr 8, 9:23 pm, spike wrote: > > > > > Hi > > > > > Can somebody please help me with handling popups using Watir i'm stuck > > > > with this. I tried many suggestions but it didnt help me. > > > > > I'm working on Windows XP and Internet Explorer 7. > > > > somebody suggested me to install autoIt for handling popups so i've > > > > installed autoIT-v3 also. > > > > > please please.. help me to handle popups like file download and > > > > javascript > > > > > thankingyou- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Error in handling popup
sorry to tel u it isnt working, ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ \BCSBI.zip") ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click #this is the button when clicked popup appears. # For handling popups def visible? object = document while object begin if object.currentstyle.invoke('visibility') =~ /^hidden$/i return false end if object.currentstyle.invoke('display') =~ /^none$/i return false end if object.invoke('isDisabled') return false end rescue WIN32OLERuntimeError end object = object.parentElement end true end def top_edge assert_exists assert_enabled ole_object.getBoundingClientRect.top.to_i end def top_edge_absolute top_edge + page_container.document.parentWindow.screenTop.to_i end def left_edge assert_exists assert_enabled ole_object.getBoundingClientRect.left.to_i end def left_edge_absolute left_edge + page_container.document.parentWindow.screenLeft.to_i end def mouse_hover(offsetX = 0, offsetY = 0) x = left_edge_absolute + offsetX y = top_edge_absolute + offsetY WindowsInput.move_mouse(x, y) end def mouse_click(offsetX = 0, offsetY = 0) x = left_edge_absolute y = top_edge_absolute WindowsInput.move_mouse(x, y) Watir.autoit.MouseClick("left", x+offsetX, y+offsetY, 1) sleep(2) end def right_click(offsetX = 0, offsetY = 0) x = left_edge_absolute y = top_edge_absolute WindowsInput.move_mouse(x+offsetX, y+offsetY) WindowsInput.right_click end require 'win32ole' def test_check_for_popups autoit = WIN32OLE.new('AutoItx3.control') loop do ret = autoit.WinWait('Windows Internet Explorer', '' ,1) if (ret==1) then autoit.sent('{enter}') end sleep(3) end end #Below is the code for operations after the popup disappears if ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? puts "IS FEEDBACK option Yes is selected" else ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click end ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set ("Public") ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") end end On Apr 9, 12:01 pm, kiran yajamanyam wrote: > hi Spike, > > Here is the perfect solution for you problem > Copy paste the code present in the attached text file. And insted of using > click() method use yourObject.mouse_click(36,6) and remaing code will be > same to handle that windows popup using autoit( Which I have posted in last > mail). > > This is the only way u can handle this issue. It will definetly work. > > If you still have any issue send me the code you have pasted, i will correct > it and send you back. > > Regards, > Krian Y > > > > On Thu, Apr 9, 2009 at 12:10 PM, spike wrote: > > > Yes i've used the click() method. > > > On Apr 9, 11:09 am, kiran yajamanyam > > wrote: > > > Now I got the problem you are facing. I think in your code u would have > > used > > > click() method just before the code to handle popup. If this is the case > > , > > > script would not be coming out of click() method and go to next step. > > This > > > happens in a case when when used click method and if a popup appears > > after > > > click. > > > > please let me know if you have this issue. I have a work arround where in > > u > > > need to extend your element class. > > > > You can ping me at kiranyajaman...@gmail.com if you have any issues with > > > this. Try the following code once: > > > > Copy paste this code and use it. Check if its due to timing issue. > > > > require 'win32ole' > > > > autoit = WIN32OLE.new('AutoItX3.Control') > > > > autoit.WinWait('Windows Internet Explorer', '', 2) > > > > autoit.WinActivate('Windows Internet Explorer') > > > autoit.Send('{space}') > > > > Regards, > > > Kiran Y > > > > On Thu, Apr 9, 2009 at 11:29 AM, spike wrote: >
[wtr-general] Re: click_no_wait and click! not working
sir, I used the method you suggested but, it is not working i've to click the popup button manually to go further testing the application. I'm putting the code i'm using for the handling popup below, please suggest me corrections that are to be made require 'Watir' require 'test/unit' require 'watir/dialog' require 'watir/contrib/enabled_popup' class Manageresources < Test::Unit::TestCase def test_manage_resources ie = Watir::IE.start "http://192.168.25.10:215/"; ie.maximize() ie.text_field(:name, "Login1$UserName").set("") ie.text_field(:name, "Login1$Password").set("") ie.checkbox(:name, "Login1$RememberMe").click ie.button(:value, "Log In").click ie.link(:href, "http://192.168.25.10:215/administrator/ Default.aspx").click ie.link(:href, "javascript:__doPostBack ('ctl00$Menu1','Resources')").click ie.link(:href, "http://192.168.25.10:215/admin/ ManageResources.aspx").click ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ \BCSBI.zip") ie.button(:id, "ctl00_ContentPlaceHolder1_btnUpload").click #popup def popupchecker(text) sleep 10 Timeout::timeout(2) do if (ie.enabled_popup) wc = WinClicker.new wc.clickWindowsButton(/Windows Internet Explorer/, "OK", 30) end end end #Below is the code for operations after the popup disappears if ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? puts "IS FEEDBACK option Yes is selected" else ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click end ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set ("Public") ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") end end On Mar 23, 8:29 pm, Jim Matthews wrote: > I have figured a few things out with the click_no_wait problem. This > potentially affects any program that uses the Ruby "system" call, > which click_no_wait does. There is also appears to be a problem with > Watir#wait_until, that is used by enabled_popup, which is used to > check for the presence of apopup. The details follow: > > First, I think the problem with click_no_wait not actually not > clicking the button/link is a Ruby 1.8.6-27 problem. It is because > the quoted string is not passed into Ruby correctly. > > On a Ruby 1.8.6-26 system, the following happens: > > C:\>ruby --version > ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > > C:\>ruby -e "puts \"Does this work?\"" > Does this work? > > C:\> > > However, on a 1.8.6-27 system, the following happens: > > C:\>ruby --version > ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32] > > C:\>ruby -e "puts \"Does this work?\"" > -e:1: unterminated string meets end of file > > C:\> > > There is a second problem. When you set the timeout for clicking > thepopupbutton, Watir times out first: > . > . > . > if (ie.enabled_popup) > wc = WinClicker.new > wc.clickWindowsButton(/Internet Explorer/, "OK", 30) > end > > >ruby javatest.rb > > c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/waiter.rb: > 59:in `wait_until': Timed out after 4.006 seconds. > (Watir::Exception::TimeOutException) > from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/ > waiter.rb:80:in `wait_until' > from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/contrib/ > enabled_popup.rb:10:in `enabled_popup' > from javatest.rb:13 > > >Exit code: 1 > > So even though I have the click set to not timeout until after 30 > seconds, Watir seems to timeout after about 4 seconds. > > There is a temporary workaround for this that works for me. Because I > was getting the Watir timeout before thepopupcame up, I added a > sleep to my popupchecker method before the Timeout::timeout. So the > first part of the popupchecker method looks like this: > > def popupchecker(text) > sleep 10 > Timeout::timeout(2) do > > Note that I give this as a temporary solution until the wait_until is > fixed. > > Jim > > On Mar 3, 10:52 am, Jim Matthews wrote: > > > > > Here are the steps to reproduct the problem. First bring up unittests > > \html\popups1.html in IE. > > > \Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\unittests\html\popups1.html > > > Next run this script. I have extra "puts" in it to try to figure out > > what is going on. They can be remvoed or commented out. > > > Jim > > > require 'watir' > > require 'watir/ie' > > require 'watir/testcase' > > require 'watir/contrib/enabled_popup' > > > class StepTests < Watir::TestCase > > def test_01_step_test > > browser = Watir::IE.attach(:title, /Test page for/) > > browser.row(:index, 3).button(:type, 'button').click! > > popupchecker(browser, 'OK') > > end > > def popupchecker(browser, text) > > Timeout::timeout(2) do > > begin > > puts "Inside begin of popupcuecker." > > puts "browser.enabled_popup == #{brows
[wtr-general] Re: Error in handling popup
sir, I used the method you suggested but, it is not working i've to click the popup button manually to go further testing the application. I'm putting the code i'm using for the handling popup below, please suggest me corrections that are to be made require 'Watir' require 'test/unit' require 'watir/dialog' require 'watir/contrib/enabled_popup' class Manageresources < Test::Unit::TestCase def test_manage_resources ie = Watir::IE.start "http://192.168.25.10:215/"; ie.maximize() ie.text_field(:name, "Login1$UserName").set("") ie.text_field(:name, "Login1$Password").set("") ie.checkbox(:name, "Login1$RememberMe").click ie.button(:value, "Log In").click ie.link(:href, "http://192.168.25.10:215/administrator/ Default.aspx").click ie.link(:href, "javascript:__doPostBack ('ctl00$Menu1','Resources')").click ie.link(:href, "http://192.168.25.10:215/admin/ ManageResources.aspx").click ie.link(:id, "ctl00_ContentPlaceHolder1_lnkAdd").click ie.radio(:id, "ctl00_ContentPlaceHolder1_rdCourses_1").click ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ \BCSBI.zip") ie.button(:id, "ctl00_ContentPlaceHolder1_btnUpload").click #popup def popupchecker(text) sleep 10 Timeout::timeout(2) do if (ie.enabled_popup) wc = WinClicker.new wc.clickWindowsButton(/Windows Internet Explorer/, "OK", 30) end end end #Below is the code for operations after the popup disappears if ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").isSet? puts "IS FEEDBACK option Yes is selected" else ie.radio(:id, "ctl00_ContentPlaceHolder1_RdlistisFeedback_1").click end ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlAccesstype").set ("Public") ie.select_list(:id, "ctl00_ContentPlaceHolder1_DdlApprovaltype").set("Admin") end end On Apr 9, 8:02 pm, Jim Matthews wrote: > spike, > > There is a problem with the new version of Ruby that may be > contributing to your problem. I don't use autoit, I use method that > Lisa described. For more information on the problem, see: > > http://groups.google.com/group/watir-general/browse_thread/thread/c8e... > > Jim > > On Apr 9, 5:09 am, spike wrote: > > > > > sorry to tel u it isnt working, > > > ie.button(:id, "ctl00_ContentPlaceHolder1_btnNext").click > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_Uploadfile").set("D:\ > > \BCSBI.zip") > > ie.file_field(:id, "ctl00_ContentPlaceHolder1_btnUpload").click #this > > is the button when clicked popup appears. > > # For handling popups > > > def visible? > > object = document > > while object > > begin > > if object.currentstyle.invoke('visibility') =~ /^hidden$/i > > return false > > end > > if object.currentstyle.invoke('display') =~ /^none$/i > > return false > > end > > if object.invoke('isDisabled') > > return false > > end > > rescue WIN32OLERuntimeError > > end > > object = object.parentElement > > end > > true > > end > > > def top_edge > > assert_exists > > assert_enabled > > ole_object.getBoundingClientRect.top.to_i > > end > > > def top_edge_absolute > > top_edge + > > page_container.document.parentWindow.screenTop.to_i > > end > > > def left_edge > > assert_exists > > assert_enabled > > ole_object.getBoundingClientRect.left.to_i > > end > > > def left_edge_absolute > > left_edge + > > page_container.document.parentWindow.screenLeft.to_i > > end > > > def mouse_hover(offsetX = 0, offsetY = 0) > > x = left_edge_absolute + offsetX > > y = top_edge_absolute + offsetY > > WindowsInput.move_mouse(x, y) > > end > > > def mouse_click(offsetX = 0, offsetY = 0) > > x = left_edge_absolute > > y = top_edge_absolute > > WindowsInput.move_mouse(x, y) > > Watir.autoit.MouseClick("left&q
[wtr-general] How to use looping structure in watir
Hi I've a scenario where i've inserted around 20 users to a database, In my application of these 20 users only 2 users are displayed at a time in a table now i want to delete the last 10 users. For this first i need to click on the scrolling link and then select the checkbox and then click on delete button, please suggest me a solution to this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to use looping structure in watir
thankyou very much... On Apr 16, 1:24 am, Chuck van der Linden wrote: > if you know how many times you need to iterate, for example 10, then > it's as simple as > > 10.times do > > end > > The ruby cheatsheet found in the watir wiki has some really basic > examples of iteration. if that's not enough to get you going, I > might suggest read a book or two on ruby. both the 'pickaxe' book and > "Everyday scripting with Ruby" are highly recommended around these > parts. > > On Apr 15, 1:07 am, Željko Filipin > wrote: > > > On Wed, Apr 15, 2009 at 08:35, spike wrote: > > > For this first i > > > need to click on the scrolling link and then select the checkbox and > > > then click on delete button > > > Have you read this? > > >http://wiki.openqa.org/display/WTR/Quick+Starthttp://wiki.openqa.org/... > > > Željko > > --http://watirpodcast.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: click_no_wait and click! not working
Hi sir, thanks a lot for the solution it worked for me, since a week i had problem with handling popup. thankyou very much. On Mar 3, 8:52 pm, Jim Matthews wrote: > Here are the steps to reproduct the problem. First bring up unittests > \html\popups1.html in IE. > > \Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\unittests\html\popups1.html > > Next run this script. I have extra "puts" in it to try to figure out > what is going on. They can be remvoed or commented out. > > Jim > > require 'watir' > require 'watir/ie' > require 'watir/testcase' > require 'watir/contrib/enabled_popup' > > class StepTests < Watir::TestCase > def test_01_step_test > browser = Watir::IE.attach(:title, /Test page for/) > browser.row(:index, 3).button(:type, 'button').click! > popupchecker(browser, 'OK') > end > def popupchecker(browser, text) > Timeout::timeout(2) do > begin > puts "Inside begin of popupcuecker." > puts "browser.enabled_popup == #{browser.enabled_popup}" > if browser.enabled_popup > puts "In if in popupchecker." > hwnd = browser.enabled_popup(5) > puts hwnd.to_s > w = WinClicker.new > w.makeWindowActive(hwnd) > w.clickWindowsButton_hwnd(hwnd, text) > end > rescue Timeout::Error > puts 'No popup existed.' > end > end > end > end > > On Mar 2, 10:12 am, Jim Matthews wrote: > > > I am trying to deal with javascript popups. I have created the > > popupchecker method described on the wiki. > > > When I used click_no_wait, the popup came up but was not dismissed. > > Someone suggested that I try click! instead of click_no_wait because > > of some problems mentioned in recent posts. I did that and click! > > worked for the first popup. It dismissed it and the script continued. > > > When the script got to the second popup, neither click_no_wait nor > > click! worked to dismiss the popup. I put some "puts" statements is > > the popupchecker method and it appears from that, that popupchecker is > > not getting called the second time until after I manually dismiss the > > second popup. > > > I know the popupchecker code works because it successfully dismisses > > the first popup and because I have used fxri with popupchecker to > > dismiss both the popups. > > > Does anyone have an idea what is going on or something different to > > try? > > > Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: click_no_wait and click! not working
This solution worked fine for popup raised when a button is clicked, but it is not working for popup raised when clicked on a link, please suggest some solution On Mar 3, 8:52 pm, Jim Matthews wrote: > Here are the steps to reproduct the problem. First bring up unittests > \html\popups1.html in IE. > > \Ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\unittests\html\popups1.html > > Next run this script. I have extra "puts" in it to try to figure out > what is going on. They can be remvoed or commented out. > > Jim > > require 'watir' > require 'watir/ie' > require 'watir/testcase' > require 'watir/contrib/enabled_popup' > > class StepTests < Watir::TestCase > def test_01_step_test > browser = Watir::IE.attach(:title, /Test page for/) > browser.row(:index, 3).button(:type, 'button').click! > popupchecker(browser, 'OK') > end > def popupchecker(browser, text) > Timeout::timeout(2) do > begin > puts "Inside begin of popupcuecker." > puts "browser.enabled_popup == #{browser.enabled_popup}" > if browser.enabled_popup > puts "In if in popupchecker." > hwnd = browser.enabled_popup(5) > puts hwnd.to_s > w = WinClicker.new > w.makeWindowActive(hwnd) > w.clickWindowsButton_hwnd(hwnd, text) > end > rescue Timeout::Error > puts 'No popup existed.' > end > end > end > end > > On Mar 2, 10:12 am, Jim Matthews wrote: > > > I am trying to deal with javascript popups. I have created the > > popupchecker method described on the wiki. > > > When I used click_no_wait, the popup came up but was not dismissed. > > Someone suggested that I try click! instead of click_no_wait because > > of some problems mentioned in recent posts. I did that and click! > > worked for the first popup. It dismissed it and the script continued. > > > When the script got to the second popup, neither click_no_wait nor > > click! worked to dismiss the popup. I put some "puts" statements is > > the popupchecker method and it appears from that, that popupchecker is > > not getting called the second time until after I manually dismiss the > > second popup. > > > I know the popupchecker code works because it successfully dismisses > > the first popup and because I have used fxri with popupchecker to > > dismiss both the popups. > > > Does anyone have an idea what is going on or something different to > > try? > > > Jim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Working with Ajax and watir
Hi I've a problem handling a sub window which is created using ajax, the scenario i'm working in is i've a image which can be applied as theme to my webpage so when i'm clicking on the image the image opens in a new window with a "Applytheme" button at the bottom. Now i need to click on the "Applytheme" button in the new window which i'm not able to do. so please help me with this. i used the following code but it didnt work e.button(:value, "Log In").click ie.link(:href, "javascript:__doPostBack ('ctl00$lnkbtnPreferences','')").click ie.link(:href, "http://192.168.25.10:215/ChangeSkin.aspx";).click ie.button(:name, "ctl00$cph$ImageOrange").click sleep 5 NOW THE IMAGE OPENS AS A SUB WINDOW #ie.image(:id, "__VIEWSTATE").click #ie2 = Watir::IE.attach(:url, 'ChangeSkinPopupWindow.aspx') #ie3 = Watir::IE.attach(:title, 'Change Skin') ie.button(:name, "btnAppltTheme").document.scrollintoview ie.button(:name,"btnAppltTheme").click end end I TRIED USING DIALOG ALSO BUT IT DIDNT DO ANY GOOD. #dialog = ie.modal_dialog #dialog = ie.modal_dialog(:hwnd) #dialog = ie.modal_dialog(:title, 'Change Skin') so please suggest some solution... thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] how to retrieve and compare image present in the website.
Hi I've a scenario where i need to update a profile, in that update profile page i've fields for changing name, address, phone no and change image field. Now i've to check whether there is already a image added to the profile and if a image is already present i need to retrieve the image and see if it is same as the image i wanted to update, how can i do this..? please suggest me a solution thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] What are the methods available for accessing links
Hi I'm working on a application where I have a link "RATE THE COURSE" now i don want to click on this link, instead i just want to place the cursor on it because when i do so i'll get some STARS which i've to click to rate the course. so i want to know how to jus place the cursor on the link without clicking it. thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Working with Ajax and watir
Hi i went through the link and did some changes but it didnt work for me below is the code i'm using to handle the ajax popup. please suggest the changes required require 'Watir/ie' require 'test/unit' require 'watir/testcase' require 'win32ole' require 'watir/contrib/enabled_popup' class Learntrack < Test::Unit::TestCase def test_learntrack1 ie = Watir::IE.start "http://192.168.25.10:215/"; ie.maximize() ie.text_field(:name, "Login1$UserName").set("vinay") ie.text_field(:name, "Login1$Password").set("computer") ie.checkbox(:name, "Login1$RememberMe").click ie.button(:value, "Log In").click ie.link(:href, "javascript:__doPostBack ('ctl00$lnkbtnPreferences','')").click ie.link(:href, "http://192.168.25.10:215/ChangeSkin.aspx";).click ie.button(:name, "ctl00$cph$ImageOrange").click sleep 8 while (!ie.button(:id, "btnAppltTheme").exists?) puts "button exists" ie.button(:id, "btnAppltTheme").click sleep 2 popupchecker(ie, "Apply Theme") end end #popup def popupchecker(browser, text) Timeout::timeout(2) do begin puts "popupchecker begins." puts "browser.enabled_popup == #{browser.enabled_popup}" if browser.enabled_popup puts "popup enabled." hwnd = browser.enabled_popup(5) puts hwnd.to_s w = WinClicker.new w.makeWindowActive(hwnd) w.clickWindowsButton_hwnd(hwnd, text) end rescue Timeout::Error puts 'No popup existed.' end end end end On Apr 18, 4:24 am, Chuck van der Linden wrote: > You may want to read this > thread...http://groups.google.com/group/watir-general/browse_thread/thread/075... > > You need to determine if that's really some kind of popup, (and if so > what type) or if it's just a div that looks and behaves a bit like a > popup. > > On Apr 17, 2:09 am, spike wrote: > > > Hi > > > I've a problem handling a sub window which is created using ajax, the > > scenario i'm working in is i've a image which can be applied as theme > > to my webpage so when i'm clicking on the image the image opens in a > > new window with a "Applytheme" button at the bottom. Now i need to > > click on the "Applytheme" button in the new window which i'm not able > > to do. so please help me with this. > > > i used the following code but it didnt work > > > e.button(:value, "Log In").click > > ie.link(:href, "javascript:__doPostBack > > ('ctl00$lnkbtnPreferences','')").click > > ie.link(:href, "http://192.168.25.10:215/ChangeSkin.aspx";).click > > ie.button(:name, "ctl00$cph$ImageOrange").click > > sleep 5 > > NOW THE IMAGE OPENS AS A SUB WINDOW > > #ie.image(:id, "__VIEWSTATE").click > > #ie2 = Watir::IE.attach(:url, 'ChangeSkinPopupWindow.aspx') > > #ie3 = Watir::IE.attach(:title, 'Change Skin') > > > ie.button(:name, "btnAppltTheme").document.scrollintoview > > ie.button(:name,"btnAppltTheme").click > > end > > end > > > I TRIED USING DIALOG ALSO BUT IT DIDNT DO ANY GOOD. > > #dialog = ie.modal_dialog > > #dialog = ie.modal_dialog(:hwnd) > > #dialog = ie.modal_dialog(:title, 'Change Skin') > > > so please suggest some solution... > > > thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: What are the methods available for accessing links
thankyou very much it worked for me.. On Apr 21, 5:24 am, George wrote: > Yeah, you're right. I tried this on one of my favorite websites: > > First, open your browser tohttp://icanhascheezburger.com, then follow > this: > > == > require 'watir' > ie = Watir::IE.attach(:title, /Lolcats/) > > # I'm now going to mouse over the third star associated with the first > Lolcat > ie.div(:id, "whole").div(:id, "mainbody").div(:class, "pane2").div > (:class, "postsubtitle").div(:class, "js-kit-rating left").table > (:class, "js-ratings-tableWrapper").div(:class, "js-ratingWrapper").div > (:class => " js-kit-rater", :index => "3").fire_event("onmouseover") > > # The browser should now indicate that I want to vote this Lolcat 3 > stars > > BTW, can I truncate this at all? Perhaps xpath? > > On Apr 20, 4:58 pm, Chuck van der Linden wrote: > > > > > might work. > > > given what he described I'm not betting on it since I THINK that > > focus only happens if you are using tab to move stuff with a defined > > taborder (e.g. entry fields) or you actually click on something. > > > in this case it sounds like it's happening (if I read him right) when > > the mouse cursor moves over the stars, which would be onmouseover. not > > onfocus. Thing is that without seeing the code, you don't know what > > thing the 'onmouseover' has been defined for. It might be for a table > > cel, or a div, or who knows what kind of element. and you'll need to > > fire the event at the right element in order to get the client code to > > kick in and do it's thing. > > > he's either going to have to figure that out for himself, or show us > > the code where the stars are defined on the page, and more importantly > > where there's some 'onmouseover= or somesuch defined. > > > On Apr 20, 4:42 pm, George wrote: > > > > This may or may not work: > > > > browser.link(:id, "thisisalink").fire_event("onfocus") > > > > On Apr 20, 2:43 pm, Chuck van der Linden wrote: > > > > > search the group for the phrase 'onmouseover' and you'll find > > > > threads about firing that event, which is likely what is driving the > > > > code.. (which you would likely discover if you review the actual code > > > > that makes the page work, or at least the code that drives the > > > > animation of the stars) > > > > > On Apr 19, 11:06 pm, spike wrote: > > > > > > Hi > > > > > > I'm working on a application where I have a link "RATE THE COURSE" now > > > > > i don want to click on this link, instead i just want to place the > > > > > cursor on it because when i do so i'll get some STARS which i've to > > > > > click to rate the course. so i want to know how to jus place the > > > > > cursor on the link without clicking it. > > > > > > thankingyou- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: What are the methods available for accessing links
Thankyou sir you suggestion helped me. On Apr 21, 4:58 am, Chuck van der Linden wrote: > might work. > > given what he described I'm not betting on it since I THINK that > focus only happens if you are using tab to move stuff with a defined > taborder (e.g. entry fields) or you actually click on something. > > in this case it sounds like it's happening (if I read him right) when > the mouse cursor moves over the stars, which would be onmouseover. not > onfocus. Thing is that without seeing the code, you don't know what > thing the 'onmouseover' has been defined for. It might be for a table > cel, or a div, or who knows what kind of element. and you'll need to > fire the event at the right element in order to get the client code to > kick in and do it's thing. > > he's either going to have to figure that out for himself, or show us > the code where the stars are defined on the page, and more importantly > where there's some 'onmouseover= or somesuch defined. > > On Apr 20, 4:42 pm, George wrote: > > > > > This may or may not work: > > > browser.link(:id, "thisisalink").fire_event("onfocus") > > > On Apr 20, 2:43 pm, Chuck van der Linden wrote: > > > > search the group for the phrase 'onmouseover' and you'll find > > > threads about firing that event, which is likely what is driving the > > > code.. (which you would likely discover if you review the actual code > > > that makes the page work, or at least the code that drives the > > > animation of the stars) > > > > On Apr 19, 11:06 pm, spike wrote: > > > > > Hi > > > > > I'm working on a application where I have a link "RATE THE COURSE" now > > > > i don want to click on this link, instead i just want to place the > > > > cursor on it because when i do so i'll get some STARS which i've to > > > > click to rate the course. so i want to know how to jus place the > > > > cursor on the link without clicking it. > > > > > thankingyou- Hide quoted text - > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Can i get help regardin WatiN
hi i'm using the WatiN tool and i'm facing some problems can i get the solution's for WatiN here. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Can i get help regardin WatiN
Hi How to handle file download popup. i've scenario where if i click on a button a filedownload popup will open and i need to click on the save button and specify path to save the file. how to do it? please suggest some solution. On May 4, 5:12 pm, Željko Filipin wrote: > On Mon, May 4, 2009 at 07:35, spike wrote: > > can i get the > > solution's for WatiN here. > > Maybe, if you tell us what the problem is. > > Also, you will probably get better support at watir forum: > > http://sourceforge.net/mailarchive/forum.php?forum_name=watin-users > > Željko --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Can i get help regardin WatiN
ok thankyou.. On May 5, 10:27 am, George wrote: > Hey Spike, > > I'm not too familiar with WatiN, but I do know that you can set the > path using file_field > > $ie.file_field(:name, "blah").set <> > > On May 4, 9:10 pm, spike wrote: > > > > > Hi > > > How to handle file download popup. i've scenario where if i click on a > > button a filedownload popup will open and i need to click on the save > > button and specify path to save the file. how to do it? please > > suggest some solution. > > > On May 4, 5:12 pm, Željko Filipin > > wrote: > > > > On Mon, May 4, 2009 at 07:35, spike wrote: > > > > can i get the > > > > solution's for WatiN here. > > > > Maybe, if you tell us what the problem is. > > > > Also, you will probably get better support at watir forum: > > > >http://sourceforge.net/mailarchive/forum.php?forum_name=watin-users > > > > Željko- Hide quoted text - > > - Show quoted text - --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Proplem with watir
Hi Myself vinay i'm facing a problem with watir. i've written it below please respond as soon as possible. irb(main):009:0> ie.link(:text, "images").flash Watir::Exception::UnknownObjectException: Unable to locate element, using :text, "images" from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:52: in `assert_exists' from D:/Ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ element.rb:239 :in `flash' thankingyou --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---