[wtr-general] Re: Installing the IEDriverServer
OK I downloaded, installed and ran IEDriverServer.exe Now what? It is running. A little run window that says Listening on port . My IE does not have Selenium as an option to pick, and no IE started up when I ran it. And the *Everything you wanted to know about the Internet Explorer driver* web site isn't everything I wanted to know. On Tuesday, August 14, 2012 3:17:00 PM UTC-7, hillary wrote: I downloaded the server from the list. And put it in my path and I continue to get this error: Selenium::WebDriver::Error::WebDriverError: Unable to find standalone executable . Please download the IEDriverServer from http://code.google.com/p/selenium/down loads/list and place the executable on your PATH. from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/s elenium/webdriver/ie/server.rb:13:in `get' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/s elenium/webdriver/ie/bridge.rb:22:in `initialize' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/s elenium/webdriver/common/driver.rb:35:in `new' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/s elenium/webdriver/common/driver.rb:35:in `for' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.25.0/lib/s elenium/webdriver.rb:65:in `for' from C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.1/lib/watir -webdriver/browser.rb:35:in `initialize' from (irb):2:in `new' from (irb):2 from C:/Ruby192/bin/irb:12:in `main' First i tried putting the .exe in the programs folder for internet explorer C:\Program Files (x86)\Internet Explorer. The PATH entry was C:\Program Files (x86)\Internet Explorer\IEDriverServer.exe; Then I moved it to a new folder on my c drive C:\webdrivers and i added the following to my PATH environment variable C:\webdrivers\IEDriverServer.exe; Neither of these options work. What am i doing wrong? Chromedriver works. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] watir-webriver won't create a Watir::Browser for Firefox 6.0
Using Ubuntu Natty Narwhal, I just updated my Firefox to Firefox 6.0 today. Now, watir-webdriver will not follow through on creating Watir::Browser.new :firefox $ gem list --local | grep watir-webdriver watir-webdriver (0.3.1) Everything is OK with chrome: $ irb ruby-1.8.7-p352 :001 require 'rubygems' = true ruby-1.8.7-p352 :002 require 'watir-webdriver' = true ruby-1.8.7-p352 :003 browser=Watir::Browser.new :chrome = #Watir::Browser:0x7fc97b06f558 url=about:blank title=about:blank But, with firefox, watir-webdriver will not return a Browser object: ruby-1.8.7-p352 :004 firefox=Watir::Browser.new :firefox This brings up a browser window, but the irb prompt just hangs, and eventually times out: Selenium::WebDriver::Error::WebDriverError: unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055) from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/firefox/launcher.rb:77:in `connect_until_stable' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/firefox/launcher.rb:37:in `launch' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/firefox/socket_lock.rb:20:in `locked' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/firefox/launcher.rb:32:in `launch' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/firefox/bridge.rb:19:in `initialize' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/common/driver.rb:29:in `new' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver/common/driver.rb:29:in `for' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/selenium- webdriver-2.3.2/lib/selenium/webdriver.rb:81:in `for' from /home/amz/.rvm/gems/ruby-1.8.7-p352/gems/watir-webdriver-0.3.1/ lib/watir-webdriver/browser.rb:35:in `initialize' from (irb):4:in `new' from (irb):4 Any suggestions, short of downgrading Firefox? -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: watir-webriver won't create a Watir::Browser for Firefox 6.0
Thanks Jari, that did it! On Aug 17, 4:13 pm, Jari Bakken jari.bak...@gmail.com wrote: On Wed, Aug 17, 2011 at 9:39 PM, Tony Zanella tony.zane...@gmail.comwrote: Any suggestions, short of downgrading Firefox? Upgrade selenium-webdriver to 2.4.0. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: watir-webriver won't create a Watir::Browser for Firefox 6.0
Thanks Dmitriy, that did it! On Aug 17, 4:15 pm, Dmitriy Korobskiy dkro...@gmail.com wrote: On 8/17/11 3:39 PM, Tony Zanella wrote: Using Ubuntu Natty Narwhal, I just updated my Firefox to Firefox 6.0 today. Now, watir-webdriver will not follow through on creating Watir::Browser.new :firefox $ gem list --local | grep watir-webdriver watir-webdriver (0.3.1) [skipped] Any suggestions, short of downgrading Firefox? Try to upgrade selenium-webdriver to 2.4.0. It works with Fx 6.0 for me. -- DK AIM: DKroot1, Skype: DKroot -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: waitr - problem with autoit WinActivate - fails at random
Hi Alpin How did you get the click_no_wait to work on the patched ruby 1.8.6-27. Is the patch on ruby 1.8.6-27, to solve this problem? If so could you share the patch? Thanks, Tony -- 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 Logo Refresh Competition
Hi Alister, Are you still accepting logos ... ?? Thanks, Tony --~--~-~--~~~---~--~~ 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: Check value of anonymous text field
Hi ... The error is here textF = ie.text_fields.collect {|tf | puts tf} - returns null. collect {|item|block} - return an array of things returned by the block. Hence you see the undefined method `name' for nil:NilClass (NoMethodError) try this - #collect Text fields elaments textF = ie.text_fields.collect {|tf | tf} # iterate to check for none_null_ name text field for tf in textF do if ie.text_field(:name, tf.name).value != 'null' puts tf.name.to_s end Thanks, Tony --~--~-~--~~~---~--~~ 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: Modal dialog window opened from page_load event
Hi Ste, Earlier the wait method would get stuck when there is a popup during page laoding. Now it exits from the waut method and waits for you to handle the popup. Refer to this to handle popups - (doesnt use autoit for this) http://groups.google.com/group/watir-general/browse_thread/thread/c2ee4fdebe00a2d2/d42a15121e820178#d42a15121e820178 Thanks, Tony --~--~-~--~~~---~--~~ 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: Reg-Image(need help urgent)
Hi iLa, try this ie.image(:value, submit) Thanks, Tony --~--~-~--~~~---~--~~ 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 WITH QC INTEGRATION
Hi Kumar, The test scripts can also be saved in QC. The result files, test results, steps etc can be updated back into QC. QC provides complete automation using its com library. Thanks, Tony --~--~-~--~~~---~--~~ 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 fire_event that opens a modal dialog no wait needed
Hi Adrian, You are trying to fire_event on the row. Could you provide the html or part of the html that contains the row? The row should have the mousedown event. The fireevent will only return after the modal dialog is clicked on. fire_event_no_wait will return after the call. Could you change your code to below and try again - I have removed the r.fire_event(onmouseover) which blocks if a modal dialog is shown here ... and used only r.fire_event_no_wait (onmousedown) require 'rubygems' require 'watir' class RunProg def Run() puts(Inside Run) ie = Watir::IE.new ie.goto app_link e = Watir::IE.attach(:title, /APP Title/) e.button(:id, menu_button_id).click d = e.div(:id, sub_menu_div_id) t = d.table(:index, 1) r = t.row(:index, 1) puts(r) r.fire_event_no_wait(onmousedown) # it should not block here puts e.url end end Thanks, Tony --~--~-~--~~~---~--~~ 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: Modal dialog window opened from page_load event
Hi, Whenever there is a modal dialog during a page load, the wait method will be stuck till someone clicks on the OK or CANCEL to dismiss the modal dialog. The code will be stuck in the below while loop the wait method(ie- class.rb). begin while @ie.busy # XXX need to add time out sleep a_moment end ie.add_checker PageCheckers ::HANDLE_MODAL would also not work since run_error_checks would only work at the end of the wait method. You would have to make changes to the wait method in C:\ruby\lib\ruby \gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb Replace the wait method with the below code - will also handle any security alert, security information, certificate error(ie 6) and return from the wait method when a popup window is loaded when in the busy while loop. http://pastie.org/596458 def wait(no_sleep=false) @rexmlDomobject = nil @down_load_time = 0.0 a_moment = 0.2 # seconds start_load_time = Time.now outval = ' ' * 30 popwndtitle = '' #puts CALLLED WAIT !!! begin while @ie.busy # XXX need to add time out sleep a_moment # 1-SECURITY INFORMATION - PAGE CONTAINS BOTH SECURE AND INSECURE ITEMS YES-6 # 2-Security Alert - Certificate error YES-1 pophwnd = Win32API.new(user32, GetWindow, 'Li', 'L').Call (@ie.hwnd.to_i, 6) # only handle if there is a popup and handle only 2 popups, if any other popups occur return. if pophwnd !=0 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (pophwnd,outval,30) popwndtitle = outval.rstrip.chomp(\000) return 0 if !(popwndtitle.include?(Security Alert) || popwndtitle.include?(Security Information)) cntrlhwndYES = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 1) Win32API.new(user32, SendMessage,'','L').Call (cntrlhwndYES, 0x0006, 1,0) Win32API.new(user32, SendMessage,'','L').Call (cntrlhwndYES, 0x00F5, 0,0) cntrlhwndYES = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 6) Win32API.new(user32, SendMessage,'','L').Call (cntrlhwndYES, 0x0006, 1,0) Win32API.new(user32, SendMessage,'','L').Call (cntrlhwndYES, 0x00F5, 0,0) end end until @ie.readyState == READYSTATE_COMPLETE do sleep a_moment end sleep a_moment until @ie.document do sleep a_moment end documents_to_wait_for = [...@ie.document] rescue WIN32OLERuntimeError # IE window must have been closed @down_load_time = Time.now - start_load_time sleep @pause_after_wait unless no_sleep return @down_load_time end while doc = documents_to_wait_for.shift begin until doc.readyState == complete do sleep a_moment end @url_list doc.location.href unless @url_list.include? (doc.location.href) doc.frames.length.times do |n| begin documents_to_wait_for doc.frames[n.to_s].document rescue WIN32OLERuntimeError, NoMethodError end end rescue WIN32OLERuntimeError end end @down_load_time = Time.now - start_load_time run_error_checks sleep @pause_after_wait unless no_sleep @down_load_time end Let me know if you have any issues. Thanks, Tony --~--~-~--~~~---~--~~ 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 fire_event that opens a modal dialog no wait needed
Hi Adrian, The above code works fine for me ... by changing img.fire_event_no_wait(mousedown) to img.fire_event_no_wait (onmousedown) Maybe you could post the whole code that you are using ... so we could take a look at what you are exactly trying to do...?? Not sure on the threads -- I believe if there is a blocking part within a thread .. it should not block on the other threads. Thanks, Tony --~--~-~--~~~---~--~~ 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: Is there a method to handling modal dialog but not providing the title?
Hi Wesley, There is a different technique to handling popups without autoit - This will act only on the current ie window which watir is using not any other browser. The below will handle alert, confirm , prompt, auth dialog box. Usage: require 'watir' iewin = Watir::IE.new iewin.goto(http://www.w3schools.com/js/tryit_view.asp? filename=tryjs_alert) iewin.button(:value, Show alert box).click_no_wait txt = iewin.clickprompt() puts txt #prints the popup text You would have to add the below code to C:\ruby\lib\ruby\gems\1.8\gems \watir-1.6.2\lib\watir\ie-class.rb ( add into module Watir, class IE http://pastie.org/595060 Thanks, Tony --~--~-~--~~~---~--~~ 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: Is there a method to handling modal dialog but not providing the title?
, 1003) cntrlpassword = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(cntrlhwnd, 1005) if prompt.size == 2 sendmessage = Win32API.new(user32, SendMessage, 'LLpp', 'L') sendmessage.Call(cntrlusername, 0x000C, '', prompt[0]) # calling sendmessage with WM_SETTEXT sendmessage.Call(cntrlpassword, 0x000C, '', prompt[1]) # calling sendmessage with WM_SETTEXT end cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1) cntrlhwndCANCEL = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) button.include?(OK) ? clickWin32Button(cntrlhwndOK) : clickWin32Button(cntrlhwndCANCEL) end private :handlepopup3 def clickWin32Button(cntrlhwnd) Win32API.new(user32, SendMessage,'','L').Call(cntrlhwnd, 0x0006, 1,0) Win32API.new(user32, SendMessage,'','L').Call(cntrlhwnd, 0x00F5, 0,0) end private :clickWin32Button ### Thanks, Tony --~--~-~--~~~---~--~~ 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 fire_event that opens a modal dialog no wait needed
Hi Adrian, Please note - make sure you have edited the element.rb to include fire_event_no_wait code. Using the above fire_event_no_wait iam able to do a fire event on a mousedown. Here's an example of the mousedown and mouseover event (should work with any events)- require 'watir' iewin = Watir::IE.new iewin.goto(http://www.w3schools.com/jsref/tryit_view.asp? filename=tryjsref_onmousedown) img = iewin.image(:xpath, //img) img.fire_event_no_wait(mousedown) puts will return now without waiting for alert box ## wait for a few secs and the alert box will come up sleep 5 iewin.goto(http://www.w3schools.com/jsref/jsref_onmouseover.asp;) img = iewin.image(:alt, W3Schools) img.fire_event_no_wait(onmouseover) Thanks, Tony --~--~-~--~~~---~--~~ 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: Is there any way to run a watir script automatically in every hour.
Hi Maumita, 1. Not sure on this. 2. You can add your scripts to a batch file and run the batch file from task scheduler. Thanks, Tony --~--~-~--~~~---~--~~ 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: Firefox 3.5 compatible with FireWatir?
Hello all, I work in an office with developers using Linux, Mac, and Windows boxes. We have a set of regression tests written in FireWatir that we run on these various boxes. Since a couple of us (Mac and Windows) have upgraded to Firefox 3.5, the jssh plugins (on Mac jssh 0.1 and on Windows jssh 0.9) no longer work. I haven't yet updated Firefox on the Linux box to 3.5 (currently 3.0.13 with jssh 0.9), but I would like to eventually. Any suggestions, or news on updating the plugin for the different platforms? On Jul 16, 10:02 am, Al B. a...@comcast.net wrote: Hi Angrez, I tried it and it didn't work. I still get the same error in the error console. Regards, Al B. On Jul 16, 5:44 am, Angrez Singh ang...@gmail.com wrote: for those whom XPI is not working onFirefox3.5can you try installing Microsoft Visual C++ 2008 SP1 Redistributable Package (x86) from here:http://www.microsoft.com/downloads/details.aspx?FamilyID=a5c84275-3b9... Let me know if this helps. Thanks, Angrez On Thu, Jul 16, 2009 at 1:59 PM, al3kc aleks.kiev...@gmail.com wrote: I have a similar error Failed to load XPCOM component: C:\Documents and Settings\username \Application Data\Mozilla\Firefox\Profiles\mk3pna4d.default\extensions \j...@extensions.mozilla.org\components\jssh.dll I don't have 'extensions' folder in mk3pna4d.default at all.- 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: Pick pop-up text and oracle DB connectivity issue
, '', prompt[0]) # calling sendmessage with WM_SETTEXT sendmessage.Call(cntrlpassword, 0x000C, '', prompt[1]) # calling sendmessage with WM_SETTEXT end cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1) cntrlhwndCANCEL = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) button.include?(OK) ? clickWin32Button(cntrlhwndOK) : clickWin32Button(cntrlhwndCANCEL) end def clickWin32Button(cntrlhwnd) Win32API.new(user32, SendMessage,'','L').Call(cntrlhwnd, 0x0006, 1,0) Win32API.new(user32, SendMessage,'','L').Call(cntrlhwnd, 0x00F5, 0,0) end Thanks, Tony --~--~-~--~~~---~--~~ 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: customize xml generated by ci_reports
Hi Pallavi, When using your modified file, you dont need to require ci_reporter nor need to have it installed. Just require the modified file. require 'watir' #require 'ci/reporter/test_suite.rb' require 'YOUR MODIFIED FILE' class TC_TEST_suite Test::Unit::TestCase def test_a_search test_site = http://www.google.com; browser = Watir::Browser.new browser.goto test_site browser.text_field(:name, q).set pickaxe browser.button(:name, btnG).click end end Thanks, Tony --~--~-~--~~~---~--~~ 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: customize xml generated by ci_reports
Hi Marlon, Now you dont need to use require 'ci/reporter/rake/ test_unit_loader.rb' Instead only require the modified file. Thanks, Tony --~--~-~--~~~---~--~~ 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: Ruby/Oracle connectivity
Hi Dheeraj, Had never connected to oracle db. Did the below and was able to connect to the db. 1. Downloaded ruby-oci from http://rubyforge.org/frs/download.php/56929/ruby-oci8-1.0.6-x86-mswin32-60.gem. This downloads as tar file. 2. Renamed the file from ruby-oci8-1.0.6-x86-mswin32-60.gem.tar to ruby-oci8-1.0.6-x86-mswin32-60.gem 3. gem install ruby-oci8-1.0.6-x86-mswin32-60.gem 4. Downloaded Oracle instant Basic client (45mb) from http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html 5. Extract it to C:\Oracle\instantclient_11_1 6. Added C:\Oracle\instantclient_11_1 to the path variable. dbtest.rb require 'oci8' OCI8.new('username', 'password', 'hostname:port/SID').exec ('select * from temp_cancel_subs') do |r| puts r.join(',') end This worked for me. I had to connect to oracle 10g Thanks, Tony --~--~-~--~~~---~--~~ 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: customize xml generated by ci_reports
Hi Dylan, nice idea .. adding the passed attribute to the test tag :) I made a few changes to the code, removed the global variable that you were using to check if passed is true or not. I try to avoid global variables. Also made the change because the passed attribute would have to be updated after each testcase run. Right now it was updated after the whole testsuite is executed. http://pastie.org/554831 The code was written to use the xml for runtime reporting (link this xml to an ajax webpage to display reports). The xml would be updated the moment a test starts or test finishes. If you dont need this, remove @report_manager.write_newreport_allsuites () from TestUnit.start_test and TestUnit.finish_test. Now the xml would be generated only after each testuite(class) has finished executing all the tests as in the original Ci_reporter. Thanks, Tony --~--~-~--~~~---~--~~ 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: Security Alert pop-up code is not working at all
Hi Dheeraj, Forgot to add the outval variable before the begin in wait. Have updated the code, please try changing the code again. Let me know if you run into any other issues. Thanks, Tony On Jul 21, 9:51 am, Dheeraj Gambhir checktestingthi...@gmail.com wrote: Hi, I tried my code by replacing goto, wait in in C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib\watir\ie-class.rb file with the code given in http://wiki.openqa.org/display/WTR/Security+Alerts, but it is giving the following error now: C:\Program Files\Watir\examplesruby finalcount.rb Launched the global pop-up handler c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:480:in `wait': undefined local variable or method `outval' for #Watir::IE:0x321d40c (NameErro r) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/ie-class.rb:35 9:in `goto' from finalcount.rb:48 Regards Dheeraj Gambhir On Mon, Jul 20, 2009 at 9:42 PM, Tony ynot...@gmail.com wrote: Hi Dheeraj, Modifiedhttp://wiki.openqa.org/display/WTR/Security+Alertsto handle these popups. Note: you would have to change the code in ie_class.rb files for this. No changes or extra steps is required in your testcase. The popups yes button will be clicked automatically. Thanks, Tony --~--~-~--~~~---~--~~ 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: customize xml generated by ci_reports
Hi Dylan, Ooops sorry missed that... Basically this class just gives some short cut methods to access the class variables from ReportManager. Code in file ClassAttr.rb class Class def class_attr_reader(*symbols) symbols.each do |symbol| self.class.send(:define_method, symbol) do class_variable_get(@@#{symbol}) end end end def class_attr_writer(*symbols) symbols.each do |symbol| self.class.send(:define_method, #{symbol}=) do |value| class_variable_set(@@#{symbol}, value) end end end def class_attr_accessor(*symbols) class_attr_reader(*symbols) class_attr_writer(*symbols) end end Let me know if you run into any other issues - :) Thanks, Tony --~--~-~--~~~---~--~~ 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: Find the parent window of a javascript prompt
Hi Siva, Not possible to get the popup text through the autoit or win32ole. You can however get the text through from the dialog box dom using javascript. Thanks, Tony On Jul 19, 8:16 pm, sHiVa krapa.ph...@gmail.com wrote: Tony, Are you able to get the popup text using Autoit when the popup is resulted from Firefox?. When i tried to get it popup text is displyes as blank. Regards Siva On Jul 17, 8:43 pm, Tony ynot...@gmail.com wrote: Hi, Working on getting a common way to handle popups in IE and Firefox. Iam done with handling popups in IE. In Firefox iam able to handle javscript popups, (alert, confirm, prompt and auth dialog). The issue is how do i know the popup is a child to the window which is under test.(firewatirs WINDOW_VAR) If there are more than 1 popup, then i would not know which popup to handle. Does any one know how to get the window from which the javascript popup was created, so that i could compare the object to the window firewatir is using and then handle it? Right now i use latest created window(window most recently created) and assume this is the popup which doesnt seem to be a good solution. Thanks, Tony --~--~-~--~~~---~--~~ 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: Security Alert pop-up code is not working at all
Hi Dheeraj, Modified http://wiki.openqa.org/display/WTR/Security+Alerts to handle these popups. Note: you would have to change the code in ie_class.rb files for this. No changes or extra steps is required in your testcase. The popups yes button will be clicked automatically. Thanks, Tony --~--~-~--~~~---~--~~ 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] Find the parent window of a javascript prompt
Hi, Working on getting a common way to handle popups in IE and Firefox. Iam done with handling popups in IE. In Firefox iam able to handle javscript popups, (alert, confirm, prompt and auth dialog). The issue is how do i know the popup is a child to the window which is under test.(firewatirs WINDOW_VAR) If there are more than 1 popup, then i would not know which popup to handle. Does any one know how to get the window from which the javascript popup was created, so that i could compare the object to the window firewatir is using and then handle it? Right now i use latest created window(window most recently created) and assume this is the popup which doesnt seem to be a good solution. Thanks, Tony --~--~-~--~~~---~--~~ 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: currentstyle not working in firefox
Hi, You could use getComputedStyle. This is similar to currentstyle in IE. Here is a function that is similar to the ie's element.visible function which uses getComputedStyle to get the current visibility style- def visible? assert_exists jssh_command = var val = 'true'; var str = ''; var obj = # {element_object}; while (obj != null) { try { str = document.defaultView.getComputedStyle(obj,null).visibility; if (str=='hidden') { val = 'false'; break; } str = # {DOCUMENT_VAR}.defaultView.getComputedStyle(obj,null).display; if (str=='none') { val = 'false'; break; } } catch(err) {} obj = obj.parentNode; } val; jssh_socket.send(#{jssh_command}\n, 0) vals = read_socket() return (vals == 'false')? false: true end Thanks, Paul --~--~-~--~~~---~--~~ 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: Scripting a foreign subframe
Hi Chuck, do this? I don't know. If you can point me at a public site, or give me some code to try that works on a public site, I can try it. and tell you what happens. Could you try it on this site ... 1. goto video.aol.com. 2. Click on the SignIn button. 3. SignIn Frame gets loaded from a different domain. 4. Try to enter the username/password and click on SignIn Thanks, Tony --~--~-~--~~~---~--~~ 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 do I get the page status (200, 404, 500, etc)
Hi Paul, Would suggest you use fiddler which is a free tool.(http:// www.fiddler2.com/fiddler2/) You could run fiddler while your scripts are executing and capture the status code, urls hit etc from a different process. You could also try httpwatch (not free) http://www.httpwatch.com/ This supports ruby programming and could be used along with watir to get the results you need. If anyone has a better solution using COM, iam waiting to hear. -Tony --~--~-~--~~~---~--~~ 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] Creating Frame objects before a page with a frame exists
Hi, Having trouble creating a frame object before a particular page contains the object. The framework contains an object repository which contains all the objects and methods that act on a particular page. Using textfields, links, buttons etc work fine, because this is not checked on the page if it exists when the object is created. But when creating a frame object, it is checked against the current page if the frame exists, which does not allow you store the frame objects. Below is an example- class Videopage def initialize(brow) usrtxtfield = brow.frame(:id, loginframe).text_field(:id, lgnId1) srchtxtfield = brow.text_field(:id, topQuery2) end #... other methods doing complex steps like login etc end Now the test code will require the above file. require 'watir' require 'watir/ie' require 'Videopage' #--- object repository file class Checktest Test::Unit::TestCase def test_thisframe Watir::Browser.default = ie mybrow = Watir::Browser.new vid = Videopage.new(mybrow) mybrow.goto(http://video.aol.com;) mybrow.link(:text, Sign In).click sleep 5 end end This returns an error in `locate': Unable to locate a frame using id and loginframe. (Watir::Exception::UnknownFrameException) Thanks, Tony --~--~-~--~~~---~--~~ 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] Creating Frame objects before a page with a frame exists
Hi, Having trouble creating a frame object before a particular page contains the object. The framework contains an object repository which contains all the objects and methods that act on a particular page.Using textfields, links, buttons etc work fine, because this is not checked on the page if it exists when the object is created.But when creating a frame object, it is checked against the current page if the frame exists, which does not allow you store the frame objects. Below is an example- class Videopage def initialize(brow) usrtxtfield = brow.frame(:id, loginframe).text_field (:id,lgnId1) srchtxtfield = brow.text_field(:id, topQuery2) end #... other methods doing complex steps like login etc end Now the test code will require the above file. require 'watir' require 'watir/ie' require 'Videopage' #--- object repository file class Checktest Test::Unit::TestCase def test_thisframe Watir::Browser.default = ie mybrow = Watir::Browser.new vid = Videopage.new(mybrow) mybrow.goto(http://video.aol.com;) mybrow.link(:text, Sign In).click sleep 5 end end This returns an error in `locate': Unable to locate a frame using id and loginframe. (Watir::Exception::UnknownFrameException) Is there a way to avoid the frame object from checking if the frame exists on the page when it is being created? Check only when doing an action on the frame or object within the frame. Want it to act like text_fields, buttons , links etc The other way to store the frame object i found was, by using it as a string. Is there any other way ??? example - txtfield = 'mybrow.frame(:id, loginframe).text_field(:id, lgnId1)' eval(txtfield).set(newone) Thanks, Tony --~--~-~--~~~---~--~~ 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: Dynamic Objects
You could also check if the xpath is changing, most probably the xpath for the element would not change... hence you could use xpath to identify your elements -Tony --~--~-~--~~~---~--~~ 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: overriding javascript
Hi Aidy, Got the error - The problem is the script disp_confirm is being called from a frame, and its this frames disp_confirm and window_confirm, that should be overridden. So this should be done on the page and also for all frames. (which is going to call your overridden function) require 'watir' ie = Watir::IE.new ie.goto(http://www.w3schools.com/JS/tryit.asp? filename=tryjs_confirm) ie.maximize # override the frames window.confirm ie.frame(:name, view).document.parentWindow.execScript (window.confirm=function(){return true;}) ie.frame(:name, view).button(:value, Display a confirm box).click_no_wait Wow .. great way to get rid of these confirm boxes.. only have to get this to work on firewatir tooo... Anyways I have tried this on IE8 RC1 - 8.0.6001.18344 - Tony --~--~-~--~~~---~--~~ 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: Unable to locate link in dojo dialog box
Hi Rasika, The page that you are seeing is dynamically being modified. Most of the function calls are changing the page during runtime and when you look at the source using view source in IE or Firefox ... this will display only the static page. Try using some tools like firebug for Firefox .. which will display the dynamic changes to the pages .. here you can check for the references for your link.(Dont use viewsource) I think you can use iedeveloper for ie. -Tony --~--~-~--~~~---~--~~ 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: Calling Javascript function from WATIR
Hi Vivek, Yes you can call javascript functions from watir - The method is execScript, you can call any javascript method or variable available in the webpage. eg: ienw = Watir::IE.new ienw.document.parentWindow.execScript(alert(\hi\)) Firewatir too has a method to execute javascript calls - js_eval ffnew = FireWatir::Firefox.new ffnew.js_eval(document.cookie) -Tony --~--~-~--~~~---~--~~ 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: It displays error message when I use method bring_to_front.
Hi Margam, Weird that regsvr32 is not found hmm... Anyways could try and search for the regsvr32.exe file in location C: \WINDOWS\system32 If present run the command from C:\WINDOWS\system32, else try and get a copy of regsvr32 from another system and copy it to your system. Should work .. but i doubt that regsvr32 is removed from your system. -Tony --~--~-~--~~~---~--~~ 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: Accessing an application's registry keys with Ruby
Hi Shelton Here is an example of reading and writing the registry. require 'win32/registry' #Common Registry Paths hkey_local_machine=Win32::Registry::HKEY_LOCAL_MACHINE hkey_current_user=Win32::Registry::HKEY_CURRENT_USER # Returns the Microsoft Registry path to the Microsoft software information sMSRegPath=SOFTWARE\\Microsoft def getKeyValue(hive, key_path, key_name) reg_obj=hive.open(key_path, Win32::Registry::KEY_READ) begin reg_typ, reg_val = reg_obj.read(key_name) rescue Win32::Registry::Error puts key not found : #{key_name} end return reg_val end #used to set a String value for a key def setKeyStringValue(hive,key_path, key_name, key_value) reg_key=hive.open(key_path, Win32::Registry::KEY_WRITE) reg_key.write(key_name,Win32::Registry::REG_SZ,key_value) end #used to set a DWord value def setKeyValue(hive,key_path, key_name, key_value) reg_key=hive.open(key_path, Win32::Registry::KEY_WRITE) reg_key.write(key_name,Win32::Registry::REG_DWORD,key_value) end #eg:usage to get current username or domain # Returns the Logged in username def getCurrentUser return getKeyValue(hkey_local_machine,#{sMSRegPath}\\Windows NT\ \CurrentVersion\\Winlogon,DefaultUserName) end #Returns the Logged in Domain def getCurrentDomain return getKeyValue(hkey_local_machine,#{sMSRegPath}\\Windows NT\ \CurrentVersion\\Winlogon,DefaultDomainName) end Hope this helps you... -Tony --~--~-~--~~~---~--~~ 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: LoadError
Hi Parul, try running this at the cmd ... gem update --system gem install watir After everything is installed try running in irb. Also once you start irb from cmd or run dialog .. you dont need to enter irb within it. This is what it will look like in irb. irb(main):001:0 require watir = true irb(main):002:0 i see that you have started irb again and to run require you are using irb require watir ... is wrong. (just use require watir) -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to handle Security Alert or Certificate Exception popup
Hi Lucas... Sorry .. didnt explain on how to use the code provided. There are 2 ways to use this - 1) Before the start of executing the testcases .. the framework starts the CertificateCheck process. The below is the code to start the process and continue executing the rest of the code (start executing the testcases)- IO.popen(#{DIR_WHERE_CERTFICATECHECK_IS_PRESENT}CertificateCheck) After all the testcases have executed ... kill the process. Use the below command - IO.popen(taskkill /f /im CertificateCheck.exe) 2) Start CertificateCheck by double clicking the exe (make sure the popup.lst file is present in the same directory as CertificateCheck).Then start executing your testcases. After all testcases have finished close the script (present in the system tray). Why run the process(security alert close script) separately? (independent of test script) When testing a webpage .. certificates can expire anytime ... also you are not testing the certificate cause qa env and prod env certificates would be different. So would be better to keep this part separate from your test script. Hence even if there are no certificate popups .. there would not be any changes to be made to the test script. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Security Alert frustration
Hi Lucas, Have updated the post - http://groups.google.com/group/watir-general/browse_thread/thread/ec15a112b98a49aa Although its ok to handle security alerts in your testscripts, it would be better to handle it separately. If the security alert doesnt come up ... then you would have to change the testscript. By Handling this in a separate process.. you wouldnt have to change your testscript at all. Hope this is the last time Security alert frustrates you .. :) -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to enter values in text field present in forms
Hi Divya, Use the text_field to identify the object directly. ie.text_field(:name, phone).set(record['mobilenumber']) -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Not able to identify object
Hi Divya, ie.textField(:name, 'phone').set(9123456789) ... looks wrong Should be ie.text_field(:name, 'phone').set(9123456789) or ie.text_field(:name, 'phone').value = 9123456789 You could also use value.. not sure on the others. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: operator not working
Hi, Got the error - real = ie.frame(:id,wfFrame).table (:id,lkpTradingPartnerType_LkpTblRows) [2] [1] The above statement returns an object of Watir::TableCell and the length for this will not be the string length. Maybe the == also is not working due to this. Do the below real = ie.frame(:id,wfFrame).table (:id,lkpTradingPartnerType_LkpTblRows) [2] [1].to_s list = ie.frame(:id,wfFrame).table (:id,lkpTradingPartnerType_LkpTblRows) [3] [1].to_s to_s will convert to a string and this should compare properly. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Security Information pop-up turns up two times, how to deal with the input between the two pop-up turning up?
Hi Wesley, Maybe the wait method has already finished loading ... and doesnt wait anymore .. You could clarify this by putting a puts statement before text_field. Also you could handle this 'Security Information' outside your code, so that it runs in parallel with your testcode. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] How to handle Security Alert or Certificate Exception popup
Hi et all, Have noticed a lot of questions on how to handle the security alert window (Certificate expired window in IE), and thought would share the below- Have added an attachment- CertificateCloser.zip The below files are present- CertificateCheck.exe CertificateCheck.au3 Popup.lst CertificateCheck.exe is the compiled autoit script. It takes the Popup.lst file from the current directory or takes an argument(path to the popup.lst file). CertificateCheck.au3 The code for review or modification. Popup.lst contains the below (make sure you end with an empty line) Security Alert,1 The first entry is the Window title, button_id Hence you can add more window titles and button_ids to close. Also each time the popup.lst is updated, the script need not be closed, it picks up the latest window data from the file. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to save a cookie and reload it?
Like Alex had said, its not that simple to add a cookie and get the cookie details by using ie77.document.cookie = tmpcookie. A cookie is set by the server and has 3 main identifiers - (name, domain, path) if any of these 3 identifiers are different, a new cookie is created. There are a few limits when you try to access a cookie using document. Will explain it to you using an example - clear all cookies and start ie and go to google.com. After this run javascript: alert(document.cookie); in the url field. You would see something like - PREF=ID=80fb690664c20f44:TM=1226473461:LM... What this actually means is there is a cookie with name: PREF and value: ID=80fb690664c20f44:TM=1226473461:LM... This shows only one cookie is set. But actually 2 cookies were set, one is for google.com domain and the other google.co.in (cause iam in India and google does a redirect to google.co.in). We can't access the cookie for google.com unless iam at the google.com. document.cookie will only display cookies that are accessible by the domain that served the current page. If iam at google.co.in only cookies of this site are shown and not from msn or yahoo or aol. So now you have got the name and value, what about the domain and path ... path most of time by default is /. Domain would be for which domains this cookie would be sent out to. in this case its .google.co.in Now there is also an expiry date which mentions if the cookie is a session cookie or not. ie77.document.cookie will return n number of cookies with a ; as delimiter. But this may not be returning you everything you need. For example the path of a cookie in mail.google.com is /mail You need to set this too. Suggestion is login to your application and check all the cookies that being set for each domain etc using firefox or a proxy. And then try setting your cookie with specific details not just the name and value. Here is a good read to read and set cookies - http://www.htmlgoodies.com/beyond/javascript/article.php/3470821 -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Visible method not present for Watir 1.6.2, present in firewatir
Looks like the visible method that was present in Watir 1.5.6 is not present any more after installing 1.6.2. Checked out the latest svn trunk and i find the visible method present, but after installing 1.6.2 gem, its not present for Watir, its present for firewatir. --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How can I get the text in the frame text field?
oops forgot.. here's the link ... http://wiki.openqa.org/display/WTR/Frames --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir 1.6.1 is available for testing
Hi Bret, Was able to install Watir 1.6.1 with no issues. (checked on WinXp2) Was lookign at the issue which Tiffany had reported ... http://groups.google.com/group/watir-general/browse_thread/thread/13c06969bc28f4c0 2. Working with links using the link text may be different with FireWatir. For example, my application's login page has a link with text Login. the command fox.link(:text, 'Login').click gives the following error: Watir::Exception::UnknownObjectException: Unable to locate element, using :text, Login from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/ firewatir/MozillaBaseElement.rb:967:in `assert_exists' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.0/lib/ firewatir/MozillaBaseElement.rb:1125:in `click' from (irb):58 but using a regex for the link text works - fox.link(:text, / Login/).click I've used the DOM inspector in Firefox and found that there may be a leading and trailing space around the text, so I tried fox.link(:text, ' Login ').click but that doesn't work either. Is this just a difference in working with Firefox versus IE? Clicking on the link using text 'Login' works fine in IE. I'll keep working on this here to see if it's just something strange with our application. Yep - here's the login page for our production site: https://producer.icat.com/icatsss/Main.startup.do Michael Hwee had said there were some junk texts and thought would check this... whenever the text contains nbsp; the jssh shell shows it as   Hence nbsp;Loginnbsp; would show up as  Login  Now fireatir is trying to compare Login or Login to this  Login  which always fails. Now ran this through jssh element.textContent.toSource() which returned new String(\xA0Login\xA0) so to convert the \xA0 to a space used element.textContent.replace(/ \xA0/g, ) Now ie uses innerText to get the text present .. but this always returns the text trimmed. Hence to do the same in Firefox used .. element.textContent.replace(/ \xA0/g, ).replace(/^\s+|\s+$/g, '') Hence changes to be made to MozillaBaseElement.rb file line number 437: attribute = element.textContent; replace with below - attribute = element.textContent.replace(/\\xA0/g,\ \).replace(/^\\s+| \\s+$/g, ''); what = what.replace(/^\\s+|\\s+$/g, ''); Same file - text() -- line no:1046 replace #{BODY_VAR}.textContent; with #{BODY_VAR}.textContent.replace(/ \\xA0/g,\ \); replace #{element_object}.textContent; with #{element_object}.textContent.replace(/\\xA0/g,\ \); This will return the same in text in ie and firefox. fox.link(:text, 'Login').click will work in both ie and firefox fox.link(:text, ' Login ').click will work only in firefox Thanks, Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Firewatir support for cookies
Hi Wesley, If you are using any testcase that need to check cookies or are planning to .. Could you give me some feedback as to what types of checks would you perform? i was thinking would add a function like getCookiesAccessibleByDomain - which return all teh cookies that might be sent when visiting a certain domain etc... -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Firewatir support for cookies
Hi, Have been able to get cookie information from firefox using the below code. All the cookies are returned as an array with all the information. Thought would share the same Still working on updating and creating a new cookie. module FireWatir class Firefox # - gets all cookies from browser def getAllCookies jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr = comp.classes[\@mozilla.org/cookiemanager; 1\].getService(comp.interfaces.nsICookieManager); jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator; e.hasMoreElements();) { var cookie = e.getNext().QueryInterface(comp.interfaces.nsICookie); jssh_command += allcookies = allcookies + cookie.host + \;\ + cookie.name + \='\ + cookie.value + \';Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ + cookie.status + \;Policy=\ + cookie.policy + \\\n\; } allcookies; $jssh_socket.send(#{jssh_command}\n, 0) val = read_socket() vals = val.split(\n) return vals end #- getSessionCookies def getSessionCookies jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr = comp.classes[\@mozilla.org/cookiemanager; 1\].getService(comp.interfaces.nsICookieManager); jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator; e.hasMoreElements();) { var cookie = e.getNext().QueryInterface(comp.interfaces.nsICookie); jssh_command += if (cookie.expires == 0) { allcookies = allcookies + cookie.host + \;\ + cookie.name + \='\ + cookie.value +\';Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ + cookie.status + \;Policy=\ + cookie.policy + \\\n\; } } allcookies; $jssh_socket.send(#{jssh_command}\n, 0) val = read_socket() vals = val.split(\n) return vals end # - get persistentCookies def getPersistentCookies jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr = comp.classes[\@mozilla.org/cookiemanager; 1\].getService(comp.interfaces.nsICookieManager); jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator; e.hasMoreElements();) { var cookie = e.getNext().QueryInterface(comp.interfaces.nsICookie); jssh_command += if (cookie.expires != 0) { allcookies = allcookies + cookie.host + \;\ + cookie.name + \='\ + cookie.value +\';Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ + cookie.status + \;Policy=\ + cookie.policy + \\\n\; } } allcookies; $jssh_socket.send(#{jssh_command}\n, 0) val = read_socket() vals = val.split(\n) return vals end # - getCookie by Name or by Name and domain def getCookie(cookiename, domain = nil) cookiename = cookiename.upcase jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr = comp.classes[\@mozilla.org/cookiemanager; 1\].getService(comp.interfaces.nsICookieManager); jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator; e.hasMoreElements();) { var cookie = e.getNext().QueryInterface(comp.interfaces.nsICookie); if domain.nil? jssh_command += if (cookie.name.toUpperCase() == \#{cookiename}\) { allcookies = allcookies + cookie.host + \;\ + cookie.name + \=\ + cookie.value +\;Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + else jssh_command += if (cookie.name.toUpperCase() == \#{cookiename}\ cookie.host == \#{domain}\) { allcookies = allcookies + cookie.host + \;\ + cookie.name + \=\ + cookie.value +\;Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + end jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ + cookie.status + \;Policy=\ + cookie.policy + \\\n\; } } allcookies; $jssh_socket.send(#{jssh_command}\n, 0) val = read_socket() vals = val.split(\n) return vals end # - getCookies By a particular domain/host def getCookiesByDomain(domain) if (!domain.nil? domain[0] != .) domain = . + domain end vals = [] i=0 while (i2) jssh_command = var comp = #{WINDOW_VAR}.Components; var cookieMgr = comp.classes[\@mozilla.org/cookiemanager; 1\].getService(comp.interfaces.nsICookieManager); jssh_command += var allcookies=''; for (var e = cookieMgr.enumerator; e.hasMoreElements();) { var cookie = e.getNext().QueryInterface(comp.interfaces.nsICookie); jssh_command += if (cookie.host == \#{domain}\) { allcookies = allcookies + cookie.host + \;\ + cookie.name + \=\ + cookie.value + \;Path=\ +cookie.path + \;isSecure=\ + cookie.isSecure + jssh_command += \;Expires=\ + cookie.expires + \;P3P=\ + cookie.status + \;Policy=\ + cookie.policy + \\\n\; } } allcookies; $jssh_socket.send(#{jssh_command}\n, 0) val = read_socket() vals.concat (val.split(\n)) i=i+1 domain = domain[1..domain.length] end return vals end end end Let me know if this has been useful ... sadly i was not able to get any info to do the same in IE. -Tony --~--~-~--~~~---~--~~ 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
[wtr-general] Re: Consult Urgent Soluation for the View Source is Disabled
ooops sorry got your name wrong ... should have been Wiston. :) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Consult Urgent Soluation for the View Source is Disabled
Hi Witson, You could attach to the IE pop using the watir attach command and check the source code or show all elements. Or you could disable the javascript and then check the view source of the ie popup window. (view source is disabled using javascript mostly) -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Watir 1.6.0 Available for Preview Testing
While trying to run a testcase i keep getting an error - This is the script - require 'watir' Watir::Browser.default = 'ie' brow = Watir::Browser.new() brow.goto(http://www.aol.com;) brow.close tried with both firefox and ie and i get the same error watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in `klass': uninitialized constant Watir::IE (NameError) watir-common-1.6.0/lib/watir/browser.rb:20:in `klass': (eval):1:in `klass': uninitialized constant FireWatir::Firefox (NameError) Made changes to browser.rb, added this at the beginning of the file to make it work- require 'watir/options' require 'watir/ie' require 'firewatir' -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problems using visible
ahh ... forgot about the visibility attribute. :) The below is the updated code def visible? jssh_command = var val = 'true'; var str = ''; var obj = #{element_object}; while (obj != null) { try { str = document.defaultView.getComputedStyle(obj,null).visibility; if (str=='hidden') { val = 'false'; break; } str = #{DOCUMENT_VAR}.defaultView.getComputedStyle(obj,null).display; if (str=='none') { val = 'false'; break; } } catch(err) {} obj = obj.parentNode; } val; jssh_socket.send(#{jssh_command}\n, 0) vals = read_socket() return (vals == 'false')? false: true end public:visible? -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problems using visible
Was running the tests for some time .. and suddenly i started getting wrong results for visible. Look like the #{element_object} was returning null sometimes. Dont know why Started working after adding assert_exists Heres the updated code - class Element def visible? assert_exists jssh_command = var val = 'true'; var str = ''; var obj = #{element_object}; while (obj != null) { try { str = document.defaultView.getComputedStyle(obj,null).visibility; if (str=='hidden') { val = 'false'; break; } str = #{DOCUMENT_VAR}.defaultView.getComputedStyle(obj,null).display; if (str=='none') { val = 'false'; break; } } catch(err) {} obj = obj.parentNode; } val; jssh_socket.send(#{jssh_command}\n, 0) vals = read_socket() return (vals == 'false')? false: true end public:visible? end --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problems using visible
Hi All, Here's a solution to find the visible elements in Firefox. Override the Elements class in MozillaBaseElement.rb file to include the below code - require 'firewatir' class Element def visible? jssh_command = var val = 'true'; var str = ''; var obj = #{element_object}; while (obj != null) { try { str = #{DOCUMENT_VAR}.defaultView.getComputedStyle(obj,null).display; if (str=='none') { val = 'false'; break; } } catch(err) {} obj = obj.parentNode; } val; jssh_socket.send(#{jssh_command}\n, 0) vals = read_socket() vals end public:visible? end The above uses the same logic as the wiki page that Željko had mentioned for overriding watir's visible method. Hence the visible method should work the same way in both ie and firefox. Hope this is helpful -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: HOW TO GENERATE INPUT TAG OBJECTS
Hi Wiston, Here's something that iam using ... module Watir class IE def calculateXpath(object) s = curr = object s = /#{curr.invoke(tagName)}[#{getIndex(curr)}] + s par = curr.invoke(parentElement) while par.invoke(tagName).downcase != body s = /#{par.invoke(tagName)}[#{getIndex(par)}] + s par = par.invoke(parentElement) end return s.gsub(/\[1\]/, ).downcase end def getIndex(currObj) par = currObj.invoke(parentElement) valuecurr = currObj.invoke(uniqueID) valuepar = par.invoke(uniqueID) currtagname = currObj.invoke('tagName').downcase count = 0 par.invoke(children).each { |i| val = i.invoke('tagName').downcase if val.eql?(currtagname) count += 1 return count if valuecurr.eql?(#{i.invoke(uniqueID)}) end } end def getInputsRadio(props = nil) getInputsCheckBoxRadio(props, radio) end def getInputsCheckBox(props = nil) getInputsCheckBoxRadio(props, check) end def getInputsCheckBoxRadio(props = nil, value=check) type = checkbox if value.eql?(check) type = radio if value.eql?(radio) props = [type,id,name,value,checked,class,tabIndex] unless props divs = document.getElementsByTagName(INPUT) puts Found #{divs.length} Input tags s = index = 0 divs.each do |d| val = d.invoke('type').downcase if val.eql?(type) index += 1 s = #{index} props.each_with_index do |prop,i| begin s += prop +: + d.invoke(prop) + | rescue #puts got error - #{prop} end end s = s + Xpath: + calculateXpath(d) puts s end end end def getInputsText (props = nil) props = [type,id,name,value,tabIndex,readonly] unless props divs = document.getElementsByTagName(INPUT) puts Found #{divs.length} Input tags s = index = 0 divs.each do |d| val = d.invoke('type').downcase if val.eql?(text) || val.eql?(password) index += 1 s = #{index} props.each_with_index { |prop,i| begin s += prop +: + d.invoke(prop) + | rescue #puts got error - #{prop} end } s = s + Xpath: + calculateXpath(d) puts s end end end end end Although this is not the same ... as present IE class. But i use this to also display the xpath of every element along with their properties. Basically whats happening is eg: inpobj = document.getElementsByTagName(INPUT) The above will contain an array of all input tag objects. Make changes to the properties as well as the TagName to capture other types of tags. Now call a method of this object using invoke- inpobj.invoke(type) # this will display the attribute (type) for the inpobject. Hope this helps you . - Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Clearing Security Information message box
yes you could enable the below setting ... HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\EnableMixedContent Set to 1 to stop displaying the warning. or else - Internet Options-Security-Custom level - Miscellaneous - Display Mixed Content - enable This will stop the warning from showing up. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Test Environment setup : VMWare
Hi Natasha, I haven't tried anything like this, but you could create an exe file using rubyscrip2exe. Hence the need to install ruby and watir would not be there. Just run the exe to execute all your testscripts. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to capture data from a web page in Watir?
Hi Chintu, If there are many tables with no name ... use the index. var = ienw.table(:index, 1)[1][2].text will give you the 1st row, 2nd column from the 1st table. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to capture data from a web page in Watir?
Or you could parse through all the tables $ie.tables.each {|t| t.each do|row| row.each do |cell| #DO something here ... check for some condition etc end end end This should go through all the tables present with each row and column. -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: How to capture data from a web page in Watir?
Hi Chintu, Data from a webpage can be captured using Watir. It can also be captured using http, if javascript execution is not required. (screen scrapping static web pages) require 'watir' ienw = Watir::IE.new() ienw.goto(your webpage) var = ienw.table(:name, 'name of table')[1][2].text #(use :index if name is not present, [row][column]) -Tony --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---