Re: [Wtr-general] Handling popup message
Hello Charley, I am having a difficult time with handling popup window too. I followed your suggestion and used the second example. I just want to click cancel button on the file download window to close it. The script run complete with Exit code: 0 (please see the code below), but the file download window is still open. Any suggestions, please. I really appreciate your help. Kui # A Better Popup Handler using the latest Watir version. Posted by [EMAIL PROTECTED] # require 'watir' require 'watir\contrib\enabled_popup' # def startClicker( button , waitTime= 9, user_input=nil ) # get a handle if one exists hwnd = $ie.enabled_popup(waitTime) if (hwnd) # yes there is a popup w = WinClicker.new if ( user_input ) w.setTextValueForFileNameField( hwnd, "#{user_input}" ) end # I put this in to see the text being input it is not necessary to work sleep 3 # "OK" or whatever the name on the button is w.clickWindowsButton_hwnd( hwnd, "#{button}" ) # # this is just cleanup w=nil end end # # MAIN APPLICATION CODE # $ie = Watir::IE.start( "http://localhost:8080/cc/ClaimCenter.do"; ) # This is whatever object that uses the click method. # You MUST use the click_no_wait method. $ie.frame(:name, "top_frame").button(:id, "ClaimNewDocumentLinkedWorksheet:NewDocumentLinkedScreen:DocumentAttachmentDV:Attachment").click_no_wait # # 3rd parameter is optional and is used for input and file dialog boxes. startClicker( "Calcel", 7 , "" ) # # Main application code follows ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to load watir/contrib/enabled_popup
My water gem is installed in C:\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1164\Watir I verified the water version and ruby path. They looked correct. I restarted machine again and now seems working. When run script with: require 'watir' require 'watir\contrib\enabled_popup' Do not receive the error message enabled_popup (LoadError). anymore. I think I am ok for now. Thanks so much for your help! Have a great weekend. Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to load watir/contrib/enabled_popup
Where are you running the last command from and where is your watir gem? open up irb at the command line and type the following: irb>require 'watir' irb>puts Watir::IE::VERSION My guess is it's still 1.4 something. Exit irb and type this: gem list --local watir or check your path, at the command prompt type set path Perhaps you're refering to a different ruby install on your path? These are my best guesstimates and troubleshooting guidelines. -Charley On 5/11/07, Kui Zhang <[EMAIL PROTECTED]> wrote: Thanks charley! Here is what I did: 1. Uninstall Watir 1.4 2. Uninstall Ruby 3. Restart machine 4. Install Ruby 5. gem install --local watir to install gem 1.5 After restart machine, I still see the same error. Did I miss something? Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to load watir/contrib/enabled_popup
Thanks charley! Here is what I did: 1. Uninstall Watir 1.4 2. Uninstall Ruby 3. Restart machine 4. Install Ruby 5. gem install --local watir to install gem 1.5 After restart machine, I still see the same error. Did I miss something? Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to load watir/contrib/enabled_popup
looks like you didn't uninstall watir 1.4.1, the error is coming from site_ruby where that's installed. Uninstall Watir 1.4.1 and try it again. -c On 5/11/07, Kui Zhang <[EMAIL PROTECTED]> wrote: Hello, After I installed watir-1.5.1.1164.gem, I still see this error message:c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- enabled_popup (LoadError). Need help. Thanks! Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to load watir/contrib/enabled_popup
Hello, After I installed watir-1.5.1.1164.gem, I still see this error message:c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- enabled_popup (LoadError). Need help. Thanks! Kui ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Web Service client call from Ruby.
On 5/11/07, Paul Rogers <[EMAIL PROTECTED]> wrote: > the unknown element : {} html probably means you are getting an html > response back from the server - visit the url with a browser to make sure > you are not getting an error message Yes. The target for your connection should point to an XML page containing a WSDL spec for the SOAP API in question. -C "how 'bout them acronyms" M ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Unable to locate object using :url => /{variable}/
If testing_URL is a variable, I guess, it should be used without the slashes "//". Or, this also may work: $ie.link(:url => /#{testing_URL}/, :text => /More.../).click ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Unable to locate object using :url => /{variable}/
Really quick one... Trying to identify and click a link on a page, using the following: $ie.link(:url => /testing_URL/, :text => /More.../).click Where "testing_URL" is a variable I'm passing the script in a loop. In the first instance, the variable value is *search-requests*. The actual links in the code look something like: https://{+domain+}/search-requests/";>More... I'm receiving the following error: "Unable to locate object, using text(?-mix:More...)urlsearch-24hours and" It's probably quite simple, I suspect my understanding of the "/" characters and use of the variable is making life difficult for myself. Any quick assistance? (Sorry, google searching for this proved very difficult, so apologies.) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Using an ie.table.each do |row| loop when thepagein the ie window refreshes itself
Ethan Jewett wrote: > Ticket entered: http://jira.openqa.org/browse/WTR-149 > > Ian's point about 0-indexing vs. 1-indexing is noted in the ticket. > Perhaps this should only be a candidate for inclusion in Watir 1.6? > I concur. Thanks for the suggestion. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] FireWatir doesn't ignore if it doesn't exists but
I was confused about your problem. It now looks like this is a FireWatir bug. Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Watir/FireWatir merge/refactoring suggestion: down_load_time
Please submit this in Jira. I plan to start making changes such as this (i.e. that will cause compatability problems with prior versions) in Watir 1.6. Chris McMahon wrote: > I had occasion today to measure page load times in anger using > FireWatir. I don't have a regular Watir installation handy, but I > know Watir tracks the latest page load times in a variable called > "down_load_time" or "download_time" or something similar. > > FireWatir doesn't have this feature. I used the venerable > wrap-a-timer-around-the-click technique stolen from Mike Kelly, which > is pretty painless, but it made me think. > > I'd like to make two suggestions: first, that the value be renamed > "page_load_time" instead of "down_load_time", because "page loads" and > "downloads" are different things. > Second, that this value be added to FireWatir at the same time that > it's refactored in Watir. > > And, it would be really nifty if Watir and FireWatir could actually > share the same physical code files, such that a change to the function > of "page_load_time" would be instantly available to both platforms. > That is the plan. > It seems to me that this would be a good spike to explore merging the > shared code between the two platforms. > > I could, of course, be wrong, but I thought making the suggestion was > worthwhile. > Bret ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Web Service client call from Ruby.
the unknown element : {} html probably means you are getting an html response back from the server - visit the url with a browser to make sure you are not getting an error message Paul - Original Message - From: "barry" <[EMAIL PROTECTED]> To: Sent: Friday, May 11, 2007 10:16 AM Subject: Re: [Wtr-general] Web Service client call from Ruby. >I tried the approach mentioned in the link before. It didn't really work. >Right calling "create_rpc_driver". i got following error. (before I event >have chance to set the basic auth information) > > irb(main):009:0> @soap=SOAP::WSDLDriverFactory.new(url).create_rpc_driver > warning: peer certificate won't be verified in this SSL session > WSDL::XMLSchema::Parser::UnknownElementError: unknown element: {}html >from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:116:in > `decode_ta >from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:82:in > `start_elem > >from c:/ruby/lib/ruby/1.8/xsd/xmlparser/parser.rb:67:in > `start_eleme >from c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:34:in > `do_parse >from c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:31:in `parse' >from c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:31:in > `do_parse >from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:63:in `parse' >from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:42:in `parse' >from c:/ruby/lib/ruby/1.8/wsdl/importer.rb:31:in `parse' >from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:30:in `import' >from c:/ruby/lib/ruby/1.8/wsdl/importer.rb:18:in `import' >from c:/ruby/lib/ruby/1.8/soap/wsdlDriver.rb:124:in `import' >from c:/ruby/lib/ruby/1.8/soap/wsdlDriver.rb:28:in `initialize' >from (irb):9:in `new' >from (irb):9 > ___ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Web Service client call from Ruby.
I tried the approach mentioned in the link before. It didn't really work. Right calling "create_rpc_driver". i got following error. (before I event have chance to set the basic auth information) irb(main):009:0> @soap=SOAP::WSDLDriverFactory.new(url).create_rpc_driver warning: peer certificate won't be verified in this SSL session WSDL::XMLSchema::Parser::UnknownElementError: unknown element: {}html from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:116:in `decode_ta from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:82:in `start_elem from c:/ruby/lib/ruby/1.8/xsd/xmlparser/parser.rb:67:in `start_eleme from c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:34:in `do_parse from c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:31:in `parse' from c:/ruby/lib/ruby/1.8/xsd/xmlparser/xmlparser.rb:31:in `do_parse from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/parser.rb:63:in `parse' from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:42:in `parse' from c:/ruby/lib/ruby/1.8/wsdl/importer.rb:31:in `parse' from c:/ruby/lib/ruby/1.8/wsdl/xmlSchema/importer.rb:30:in `import' from c:/ruby/lib/ruby/1.8/wsdl/importer.rb:18:in `import' from c:/ruby/lib/ruby/1.8/soap/wsdlDriver.rb:124:in `import' from c:/ruby/lib/ruby/1.8/soap/wsdlDriver.rb:28:in `initialize' from (irb):9:in `new' from (irb):9 ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Running test script once for each datarow in
Vipul, You can find examples of working with excel here: http://wiki.rubygarden.org/ruby/page/show/ScriptingExcel Or, there's a library with an example watir test script I posted on the watir contributions wiki which hides some of the complexities of working with excel: http://wiki.openqa.org/display/WTR/Excel+interface+class -David -- Message: 7 Date: Fri, 11 May 2007 06:50:33 CDT From: Vipul <[EMAIL PROTECTED]> Subject: [Wtr-general] Running test script once for each datarow in excel To: wtr-general@rubyforge.org Message-ID: <[EMAIL PROTECTED] om> Content-Type: text/plain; charset=ISO-8859-1 i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rb whichever possible. Does anyone has the code or suggestion for implementing this. -- ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Running test script once for each datarow in excel
This is very simple with a CSV file: require 'csv' CSV::Reader.parse(File.open(ARGV[0], 'rb')) do |row| #open the filename given as first command line argument userid = row[0] #note that the CSV module index starts at 0 passwd = row[1] loginToSite(userid,passwd) #whatever your login code is End Cheers, Ian -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Vipul Sent: Friday, May 11, 2007 7:51 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Running test script once for each datarow in excel i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rb whichever possible. Does anyone has the code or suggestion for implementing this. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Running test script once for each datarow in excel
David Brown posted an interface to Excel on the Watir user contributions area with an example usage case that steps through rows: http://wiki.openqa.org/display/WTR/Excel+interface+class -Charley On 5/11/07, Vipul <[EMAIL PROTECTED]> wrote: i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rbwhichever possible. Does anyone has the code or suggestion for implementing this. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working
Looks like user_Name is not defined for your LoginInput class. Check your casing and make sure it exists there. Might be something like user_name, not user_Name. Otherwise we'd have to have more information on your LoginInput class. -Charley On 5/11/07, Vipul <[EMAIL PROTECTED]> wrote: now i am getting following exception 'undefined method `user_Name' for LoginInput:Class (NoMethodError)' in main source file contains the code require 'Input.rb' $ie = IE.new() $ie.goto(test_site) $ie.text_field(:id,"txtLoginID").set(LoginInput.user_Name) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] xpath question (not Watir related)
Hi, Can you give this a try? e = REXML::Document.new(ie.text).root.elements e["/tokens/ShortUrl[starts-with(@url, "resetpassword.aspx?m=7fb83717-9606-4022-bd4e-67b6f6582ada"].attributes["url"] As you already know value of 'm' in query string you can create a string a give it a try. - Angrez On 5/11/07, Zeljko <[EMAIL PROTECTED]> wrote: I have xml that looks like this. I need to get value of "hash" attribute (BF8E8F60E722E92C7ED8303916591AB4). I know the value of "m" url parameter (inside "url" attribute) (7fb83717-9606-4022-bd4e-67b6f6582ada), but I do not know the value of "code" url parameter. I know how to get attribute of a tag when I know another attribute of that tag. For example, if I knew "hash" attribute and needed "url" attribute, I would do it like this: e = REXML::Document.new (ie.text).root.elements e["/tokens/[EMAIL PROTECTED]'BF8E8F60E722E92C7ED8303916591AB4']"].attributes["url"] => "resetpassword.aspx?m=7fb83717-9606-4022-bd4e-67b6f6582ada&code=2271ad0e-d627-4e6c-bdfb-2b11d354e9ac" But, I know only part of "url" attribute. Of course, this does not work (because e[...] returns nil). e["/tokens/[EMAIL PROTECTED]'resetpassword.aspx?m=7fb83717-9606-4022-bd4e-67b6f6582ada&code=']"].attributes["hash"] => NoMethodError: undefined method `attributes' for nil:NilClass I have heard that there are xpath string functions (http://www.w3.org/TR/xpath#section-String-Functions ), but I did not understand how to use them, or would it even help in this case. I have solved this problem with regular expressions, but I guess there must be xpath solution. Also, I have already asked my developer to simplify that xml, so I can use it, but that has low priority because I have already solved the problem. Does anybody know how to do this using xpath? Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] New Version of Internet Explorer Developer Toolbar
Read more: http://blogs.msdn.com/ie/archive/2007/05/10/Internet-Explorer-Developer-Toolbar-_2D00_-Get-It-Now_2100_.aspx Get it: http://www.microsoft.com/downloads/details.aspx?FamilyId=E59C3964-672D-4511-BB3E-2D5E1DB91038&displaylang=en Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] xpath question (not Watir related)
I have xml that looks like this. I need to get value of "hash" attribute (BF8E8F60E722E92C7ED8303916591AB4). I know the value of "m" url parameter (inside "url" attribute) (7fb83717-9606-4022-bd4e-67b6f6582ada), but I do not know the value of "code" url parameter. I know how to get attribute of a tag when I know another attribute of that tag. For example, if I knew "hash" attribute and needed "url" attribute, I would do it like this: e = REXML::Document.new(ie.text).root.elements e["/tokens/[EMAIL PROTECTED]'BF8E8F60E722E92C7ED8303916591AB4']"].attributes["url"] => "resetpassword.aspx?m=7fb83717-9606-4022-bd4e-67b6f6582ada&code=2271ad0e-d627-4e6c-bdfb-2b11d354e9ac" But, I know only part of "url" attribute. Of course, this does not work (because e[...] returns nil). e["/tokens/[EMAIL PROTECTED]'resetpassword.aspx?m=7fb83717-9606-4022-bd4e-67b6f6582ada&code=']"].attributes["hash"] => NoMethodError: undefined method `attributes' for nil:NilClass I have heard that there are xpath string functions (http://www.w3.org/TR/xpath#section-String-Functions), but I did not understand how to use them, or would it even help in this case. I have solved this problem with regular expressions, but I guess there must be xpath solution. Also, I have already asked my developer to simplify that xml, so I can use it, but that has low priority because I have already solved the problem. Does anybody know how to do this using xpath? Zeljko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
[Wtr-general] Running test script once for each datarow in excel
i am testing a site which has login page. i want to automate login with different user credentials each time. i want username and pwd values to come from excel sheet or input.rb whichever possible. Does anyone has the code or suggestion for implementing this. ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] FireWatir doesn't ignore if it doesn't exists but
html of the login page looks like: http://www.w3.org/1999/xhtml"; > Remote Access Portal | Login Hello [EMAIL PROTECTED] Click the button to log in: ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Having trouble capturing text in java alert
Great thanks. That's got rid of the error message, but it still appears to be running through twice and therefore stopping midway through. The 'sign in' click takes you through to sign in page. Th continue button should cause the alert to appear. I then need to capture the text within the popup. Then select ok to deal with alert. Then finally close IE. What appears to be happening is The 'sign in' click takes you through to sign in page. Th continue button should cause the alert to appear. the jsalert_clicker selects the ok to deal with the alert I need to manually select the continue button again which causes the alert to appear again the capureText extracts the text (text = autoit.WinGetText "Windows Internet Explorer", "") and also deals with the alert (autoit.Send "{ENTER}"). require 'watir' # the controller include Watir require 'watir/WindowHelper' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'dl/win32' require 'watir/winClicker' class TC_recorded < Test::Unit::TestCase def start_jsalert_clicker Thread.new{ system("ruby \"C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\watir-1.5.1.1164\\unittests\\jscriptExtraAlert.rb\"") } end def captureText autoit = WIN32OLE.new('AutoItX3.Control') ret = autoit.WinWait "Windows Internet Explorer", "" text = autoit.WinGetText "Windows Internet Explorer", "" puts text.to_s autoit.Send "{ENTER}" end def test_1 @IE0 = IE.new @IE0.set_fast_speed @IE0.goto("www.hmv.co.uk") @IE0.link(:text, "Sign In").click start_jsalert_clicker @IE0.image(:alt, "continue").click captureText @IE0. close end end ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working
now i am getting following exception 'undefined method `user_Name' for LoginInput:Class (NoMethodError)' in main source file contains the code require 'Input.rb' $ie = IE.new() $ie.goto(test_site) $ie.text_field(:id,"txtLoginID").set(LoginInput.user_Name) ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Having trouble capturing text in java alert
Hi, Make sure you escape '\' character in the file name by putting another '\' character in front of it. - Angrez On 5/11/07, gary <[EMAIL PROTECTED]> wrote: Thanks again for your help. i am getting the following load error - ubygems.8gemswatir- 1.5.1.1164unittestsjscriptExtraAlert.rb (LoadError) require 'watir' # the controller include Watir require 'watir/WindowHelper' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'dl/win32' require 'watir/winClicker' class TC_recorded < Test::Unit::TestCase def start_jsalert_clicker Thread.new{ system("ruby \"C:\\ruby\lib\ruby\gems\1.8\gems\watir- 1.5.1.1164\unittests\jscriptExtraAlert.rb\"") } end def captureText autoit = WIN32OLE.new('AutoItX3.Control') ret = autoit.WinWait "Windows Internet Explorer", "" text = autoit.WinGetText "Windows Internet Explorer", "" puts text.to_s autoit.Send "{ENTER}" end def test_1 @IE0 = IE.new @IE0.set_fast_speed @IE0.goto("www.hmv.co.uk") @IE0.link(:text, "Sign In").click start_jsalert_clicker @IE0.image(:alt, "continue").click captureText @IE0.close end end ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Having trouble capturing text in java alert
Thanks again for your help. i am getting the following load error - ubygems.8gemswatir-1.5.1.1164unittestsjscriptExtraAlert.rb (LoadError) require 'watir' # the controller include Watir require 'watir/WindowHelper' require 'test/unit' require 'test/unit/ui/console/testrunner' require 'dl/win32' require 'watir/winClicker' class TC_recorded < Test::Unit::TestCase def start_jsalert_clicker Thread.new{ system("ruby \"C:\\ruby\lib\ruby\gems\1.8\gems\watir-1.5.1.1164\unittests\jscriptExtraAlert.rb\"") } end def captureText autoit = WIN32OLE.new('AutoItX3.Control') ret = autoit.WinWait "Windows Internet Explorer", "" text = autoit.WinGetText "Windows Internet Explorer", "" puts text.to_s autoit.Send "{ENTER}" end def test_1 @IE0 = IE.new @IE0.set_fast_speed @IE0.goto("www.hmv.co.uk") @IE0.link(:text, "Sign In").click start_jsalert_clicker @IE0.image(:alt, "continue").click captureText @IE0.close end end ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] How to handle pop menu clicking on right mouse button?
Hi Edwin, Please send part of HTML that causes popup menu to appear. Željko -- ZeljkoFilipin.com ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
Re: [Wtr-general] Solution for FAQ "Using key/value pairs" not working
> class initialValues Use an upper case 'I' for class name. @@ means class variable. Aidy On 11/05/07, Vipul <[EMAIL PROTECTED]> wrote: > hi > > i have tried following > > class initialValues >@@user_name = 'atilla' >@@last_name = 'ozgur' > end > save in intial.rb file. > > But when i use intial.rb file in main file i get syntax error ' > class/modulename must be a constant.' > > Also @@ means global variable inside class? > ___ > Wtr-general mailing list > Wtr-general@rubyforge.org > http://rubyforge.org/mailman/listinfo/wtr-general > ___ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general