[wtr-general] Re: JSSH problem on Windows server 2003
Did you installed it using Admin rights? That might only be the issue, though didn't tried it on Windows Server 2003. Thanks, Angrez On Thu, Jul 30, 2009 at 4:32 PM, pallavi shashidhar pals.sha...@gmail.comwrote: Hi There, I have the foll: installed - Ruby 1.8.6, watir 1.6.2 , firefox 3.012 OS: - Microsoft Windows Server 2003 R2 (32 bit) Jssh - 0.9 installed along with Redistributed package for VS 2005 SP1 Steps - followed all the steps mentioned at step 3 on http://wiki.openqa.org/display/WTR/FireWatir+Installation - Did run firefox from command prompt using c:\ProgramFiles\Mozillafirefox.exe -jssh (browser opens up) Am trying to run the following example : require 'watir' Watir::Browser.default = firefox Watir::Browser.start(www.mail.yahoo.com) and i get the foll: error ruby exampletest.rb c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:271:in `set_defaults': Unable to connect to machine : 127.0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is running with '-jssh' option (Watir::Exception::UnableToStartJSShException) from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:161:in `initialize' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:177:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefox.rb:177:in `start' from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser.rb:71:in `start' from exampletest.rb:3 Exit code: 1 Tried with IRB, facing the same problem : irb(main):001:0 require 'watir' = true irb(main):002:0 Watir::Browser.default = firefox = firefox irb(main):003:0 Watir::Browser.start(www.mail.yahoo.com) Watir::Exception::UnableToStartJSShException: Unable to connect to machine : 127 .0.0.1 on port 9997. Make sure that JSSh is properly installed and Firefox is ru nning with '-jssh' option from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo x.rb:271:in `set_defaults' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo x.rb:161:in `initialize' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo x.rb:177:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/firewatir-1.6.2/lib/firewatir/firefo x.rb:177:in `start' from c:/ruby/lib/ruby/gems/1.8/gems/commonwatir-1.6.2/lib/watir/browser. rb:71:in `start' from (irb):3 The same example when run on windows vista, i have no issues. Is there anything in particular to do with JSSh for Windows Server 2003? Regards, pallavi --~--~-~--~~~---~--~~ 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] Firewatir XPIs for Firefox 3.5.x
Hi, The XPIs for Firefox 3.5.x versions are there on WIKI. You can download them from: http://wiki.openqa.org/display/WTR/FireWatir+Installation Let us know if you face any problems while installing/using the XPIs for Firefox 3.5 Thanks, Angrez --~--~-~--~~~---~--~~ 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
Hey Felipe , First of all big thnx for replying, i will try this code ASAP and then let u know if stuck again. Regarding Oracle/Ruby connectivity, i faced too many issues but at last had no option so uninstall and reinstall oracle client. From then onwards, it is working fine. Fingers cross :) Thnx once again. On Thu, Jul 30, 2009 at 6:40 PM, Felipe Knorr Kuhn fkn...@gmail.com wrote: Hello Dheeraj, I defined the function in the end of this message to click on button txtButton when the alert has text equal to txtWindow You call it with: @main.button(:name, CONFIRM).click_no_wait clica_window_BUTTON Are you sure do you want to confirm?, OK @ie.waitForIE The code that really matters to you is @text = @autoit.ControlGetText(@windowCaption, , Static2) Then you compare the @text string against what you want (@text.include?(Username required) for example) PS: Do you mind sharing what you've done to get Oracle working? Hope that helps, FK -- CODE: #Encoding $KCODE = u WIN32OLE.codepage = WIN32OLE::CP_UTF8 require 'iconv' def converte str Iconv.conv('CP1252', 'UTF-8', str) end # Click the button in the window with said text def click_window_button txtWindow, txtButton # Find out IE version reg_val = '' key = 'Software\Microsoft\Internet Explorer' Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg| reg_typ, reg_val = reg.read('Version') end @ie_ver, ie_ver2, ie_ver3, ie_ver4 = reg_val.split('.') @autoit = WIN32OLE.new('AutoItX3.Control') if (@ie_ver == 7) @windowCaption = Windows Internet Explorer else @windowCaption = Microsoft Internet Explorer end # Wait for the popup loop do sleep(5) @text = @autoit.ControlGetText(@windowCaption, , Static2) if (@text != nil) @text = converte(@text) puts [INFO + Time.now.strftime(%H:%M:%S) + ] Text found: + @text end if (@text == txtWindow) puts [INFO + Time.now.strftime(%H:%M:%S) + ] Clicking button - + txtWindow @autoit.ControlClick(@windowCaption,'', txtButton) break end end end On Thu, Jul 30, 2009 at 9:47 AM, Dheeraj Gambhir checktestingthi...@gmail.com wrote: My bad Chuck, sorry for posting two problem at one go. Ruby/Oracle connectivity thing is working fine for me now. The only limitation pending is: On Login page, when we submit the form without entering confirm password value, it gives pop-up message i.e Confirm Password- Entry Required., same is the case with other validations. My requirement is to pick that pop-up message text. Is it possible? Please help if you can. On Jul 22, 9:44 pm, Chuck van der Linden sqa...@gmail.com wrote: Firstly, please do not ask two questions that are not related in a single thread. This is no different than asking a new unrelated question in an existing thread. it makes things much too confusing for everyone, and harder for anyone coming here and searching for answers to find what they need. You already have a thread about connecting to oracle, seek the answer to that issue there instead of starting a duplicate thread on the same subject which just fragments things and again makes it harder for everyone. Secondly with regard to dealing with popups, did you read this instruction? 1. Before you ask anything, please search in the group at first, you maygetgreat answers, that would save your time a lot. how to deal with Pop-ups (responding to them, verifying the happened, etc) is a topic that has been discussed at length in both the wiki/ tutorials and also in very recent subject threads here in the group. It is one of the MOST COMMON TOPICS discussed here. So, 'The Answer You Seek' (tm) is likely already here and you could have had it already without having to wait (perhaps for someone in another timezone who is currently sleeping when you post your message, who is more than likely going to refer you to the existing thread that you could have found yourself with just a little work on your part.) Don't keep posting the same thing over and over and over.. it won'tgetyou an answer any sooner. If there was someone awake and able/ inclined to respond to your original posting they would have done so. Posting again in an hour or two just means more stuff for people to wade through. Furthermore it's the kind of behavior that can cause other folks to 'flip the twit bit' on you and write you off as some kind of impatient idiot. SO, if you have searched, and read the tutorials, and tried the things there, then please, Tell us what you've tried and what the results were.. otherwise we're going to assume you've not even tried searching, or will end up suggesting a lot of things you may have already tried which wastes your and our time. Nobody is paid to respond here.. we all do it on our own time, and after a while of answering the same
[wtr-general] Re: Pick pop-up text and oracle DB connectivity issue
Felipe: I tried this and got this error: C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_support/dependenci es.rb:440:in `load_missing_constant': uninitialized constant Win32::Registry (Na meError) from C:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.3/lib/active_suppo rt/dependencies.rb:80:in `const_missing' from ./picktextpop.rb:16:in `click_window_button' from testpicktextpop.rb:19 My code goes like: ## #includes require 'watir' require 'win32ole' require 'watir/ie' require 'watir\contrib\enabled_popup' require 'picktextpop' # open the IE browser ie = Watir::IE.new test_site=' https://secure.qa2.mlb.com/enterworkflow.do?flowId=registration.ajax.wizardc_id=mlb ' ie.goto(test_site) if ie.contains_text(MLB.com account) ie.radio(:id, 'select_register').set ie.text_field(:id, register_email).set(ver...@mailinator.com) ie.button(:id, submit_btn).click_no_wait click_window_button The form was not submitted because of the following error(s)., OK ie.waitForIE else end And picktextpop contains: #Encoding $KCODE = u WIN32OLE.codepage = WIN32OLE::CP_UTF8 require 'iconv' def converte str Iconv.conv('CP1252', 'UTF-8', str) end # Click the button in the window with said text def click_window_button txtWindow, txtButton # Find out IE version reg_val = '' key = 'Software\Microsoft\Internet Explorer' Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg| reg_typ, reg_val = reg.read('Version') end @ie_ver, ie_ver2, ie_ver3, ie_ver4 = reg_val.split('.') @autoit = WIN32OLE.new('AutoItX3.Control') if (@ie_ver == 7) @windowCaption = Windows Internet Explorer else @windowCaption = Microsoft Internet Explorer end # Wait for the popup loop do sleep(5) @text = @autoit.ControlGetText(@windowCaption, , Static2) if (@text != nil) @text = converte(@text) puts [INFO + Time.now.strftime(%H:%M:%S) + ] Text found: + @text end if (@text == txtWindow) puts [INFO + Time.now.strftime(%H:%M:%S) + ] Clicking button - + txtWindow @autoit.ControlClick(@windowCaption,'', txtButton) break end end end Please have a look and see if you can help further. When it clicked Register button, pop-up gets hides and it gives error on console. On Fri, Jul 31, 2009 at 3:53 PM, Dheeraj Gambhir checktestingthi...@gmail.com wrote: Hey Felipe , First of all big thnx for replying, i will try this code ASAP and then let u know if stuck again. Regarding Oracle/Ruby connectivity, i faced too many issues but at last had no option so uninstall and reinstall oracle client. From then onwards, it is working fine. Fingers cross :) Thnx once again. On Thu, Jul 30, 2009 at 6:40 PM, Felipe Knorr Kuhn fkn...@gmail.comwrote: Hello Dheeraj, I defined the function in the end of this message to click on button txtButton when the alert has text equal to txtWindow You call it with: @main.button(:name, CONFIRM).click_no_wait clica_window_BUTTON Are you sure do you want to confirm?, OK @ie.waitForIE The code that really matters to you is @text = @autoit.ControlGetText(@windowCaption, , Static2) Then you compare the @text string against what you want (@text.include?(Username required) for example) PS: Do you mind sharing what you've done to get Oracle working? Hope that helps, FK -- CODE: #Encoding $KCODE = u WIN32OLE.codepage = WIN32OLE::CP_UTF8 require 'iconv' def converte str Iconv.conv('CP1252', 'UTF-8', str) end # Click the button in the window with said text def click_window_button txtWindow, txtButton # Find out IE version reg_val = '' key = 'Software\Microsoft\Internet Explorer' Win32::Registry::HKEY_LOCAL_MACHINE.open(key) do |reg| reg_typ, reg_val = reg.read('Version') end @ie_ver, ie_ver2, ie_ver3, ie_ver4 = reg_val.split('.') @autoit = WIN32OLE.new('AutoItX3.Control') if (@ie_ver == 7) @windowCaption = Windows Internet Explorer else @windowCaption = Microsoft Internet Explorer end # Wait for the popup loop do sleep(5) @text = @autoit.ControlGetText(@windowCaption, , Static2) if (@text != nil) @text = converte(@text) puts [INFO + Time.now.strftime(%H:%M:%S) + ] Text found: + @text end if (@text == txtWindow) puts [INFO + Time.now.strftime(%H:%M:%S) + ] Clicking button - + txtWindow @autoit.ControlClick(@windowCaption,'', txtButton) break end end end On Thu, Jul 30, 2009 at 9:47 AM, Dheeraj Gambhir checktestingthi...@gmail.com wrote: My bad Chuck, sorry for posting two problem at one go. Ruby/Oracle connectivity thing is working fine for me now. The only limitation pending is: On Login page, when we submit the form without entering
[wtr-general] Re: Pick pop-up text and oracle DB connectivity issue
Hi Dheeraj, To handle popups there is a better way without using autoit. Add the below code in to C:\ruby\lib\ruby\gems\1.8\gems\watir-1.6.2\lib \watir\ie-class.rb below visible method - def visible=(boolean) @ie.visible = boolean if boolean != @ie.visible end To execute @browser.link(:id , showconfirm).click_no_wait # this shows a popup. txt = @browser.clickprompt() #this clicks the ok button and returns the popup text. Code also available in http://pastie.org/566659 ## new code to handle popups def clickprompt(but=OK,txt =, waitTime = 10) tim = 0 poptxt= '' while tim waitTime sleep 0.2 pophwnd = Win32API.new(user32, GetWindow, 'Li', 'L').Call (@ie.hwnd.to_i, 6) # the above returns any popup windows that are present for the specific window tim += 0.2 tim += waitTime if pophwnd != 0 end return '' if pophwnd == 0 button = but.upcase outval = ' ' * 30 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (pophwnd,outval,30) popwndtitle = outval.rstrip.chomp(\000) # window title stored here outval = nil #poptype = 0 #alert and confirm have ie6 - Microsoft Internet Explorer #ie7 - Windows Internet Explorer #ie8 - Message from webpage if popwndtitle.include?(Microsoft Internet Explorer) || popwndtitle.include?(Windows Internet Explorer) || popwndtitle.include?(Message from webpage) #confirm and alerts have the above 3 window titles # poptype =1 means this is a javascript alert tag #poptype = 1 poptxt = handlepopup1(pophwnd,button) elsif popwndtitle.include?(Explorer User Prompt) #prompts have the above window title #poptype = 2 poptxt = handlepopup2(pophwnd,button, txt) elsif popwndtitle.include?(Connect to) #authentication dialog #also make sure the username and password text fields are present - if present we got the auth dialog cntrlhwnd = 0 cntrlhwnd = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 1002) #poptype = 3 if cntrlhwnd != 0 #verified the 2 textboxes are present to enter the values return '' if cntrlhwnd == 0 poptxt = handlepopup3(pophwnd,button, prompt) end return poptxt end def handlepopup1(pophwnd, button) # handles the alerts and confirm dialogs #Yes there is a popupwindow... hence get the controlhandle for the text control - 65535 cntrlhwnd = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 65535) #now get the text from the popup outval = ' ' * 200 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (cntrlhwnd,outval, 200) poptext = outval.rstrip.chomp(\000) outval = nil #confirm ok-1 and cancel-2, alert ok-2 cntrlhwndOK = 0 cntrlhwndCANCEL = 0 cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1) if cntrlhwndOK == 0 # only 1 button alert cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) clickWin32Button(cntrlhwndOK) # done clicking javascript ok button return poptext else # this is a confirm with 2 buttons cntrlhwndCANCEL = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) end button.include?(OK) ? clickWin32Button(cntrlhwndOK) : clickWin32Button(cntrlhwndCANCEL) #clickWin32Button(cntrlhwndCANCEL) return poptext end def handlepopup2(pophwnd, button, prompt) #handles prompt boxes which takes a value as input cntrlhwndOK = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1) cntrlhwndCANCEL = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 2) # get handle to the text control from the prompt box cntrlpromptText = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 8132) #now get the text from the popup outval = ' ' * 200 Win32API.new(user32, GetWindowText, 'Lpi', 'L').Call (cntrlpromptText,outval, 200) poptext = outval.rstrip.chomp(\000) outval = nil cntrltextarea = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(pophwnd, 8133) if prompt.size != 0 sendmessage = Win32API.new(user32, SendMessage, 'LLpp', 'L') sendmessage.Call(cntrltextarea, 0x000C, '', prompt) # calling sendmessage with WM_SETTEXT end button.include?(OK) ? clickWin32Button(cntrlhwndOK) : clickWin32Button(cntrlhwndCANCEL) return poptext end def handlepopup3(pophwnd, button, prompt) # handles the auth dialog box , 3 tries then the 401 page is shown cntrlhwnd = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call (pophwnd, 1002) cntrlusername = Win32API.new(user32, GetDlgItem, 'Li', 'L').Call(cntrlhwnd, 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,
[wtr-general] Watir 1.7
Hi Guys, Do we have a timeline on when Watir 1.7 will be released? Aidy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: how to convert my script to exe file
thanks, it works like charm. On Jul 31, 8:38 am, Wesley Chen cjq@gmail.com wrote: Please: gem install ocra ocra yourscript.rb Thanks. Wesley Chen. On Thu, Jul 30, 2009 at 1:43 PM, Alex.Dev btb8...@gmail.com wrote: hello, all, I tried to convert my script to exe file, but always failed with this error: rb_thread_status. Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] Watir: watir (1.5.6) Exerb: Exerb 4.7.0 Here is my code snippets: require 'watir' @ie = Watir::IE.start('http://www.google.com') Regards, lefish --~--~-~--~~~---~--~~ 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 1.7
We don't have any hard plans, both Bret and I have been really busy lately. There are quite a few changes in the current git repo which we need to document and push into an actual release. I'll try to find some time soon so that we can get nail down the plans and get a new release out. Charley Baker blog: http://blog.charleybaker.org/ Lead Developer, Watir, http://wtr.rubyforge.org QA Architect, Gap Inc Direct On Fri, Jul 31, 2009 at 9:49 AM, aidy lewis aidy.le...@googlemail.comwrote: Hi Guys, Do we have a timeline on when Watir 1.7 will be released? Aidy --~--~-~--~~~---~--~~ 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: Help with class,method,objects
if this is the method def def login(ie) login script text_field.set(adunme) text_field.set(adpwd) end then can you explain the line by line intention of this code? Watirloo: Semantic Page Objects in UseCases http://github.com/marekj/watirloo/ On Thu, Jul 30, 2009 at 10:29 PM, Rohan Ojharohan.o...@bsil.com wrote: Hi, Yaa I am using the same but I have modified it for my usage. What I do is : class Tax_CheckMapping def returnExcelData(file,range) @range=range @file=file taxChkOpr=[] excelObject=Excel.new excelData=excelObject.getRowData(@file,'SCENARIOS-TESTDATA',@range) incr_i=0 excelData.each do |oneRow| taxChkOpr[incr_i]=Tax_CheckOperation.new taxChkOpr[incr_i].setUserData(oneRow['Admin User Name'].to_s,oneRow['Admin Password'].to_s ) incr_i=incr_i+1 end return taxChkOpr end end And in the second class I do the following operations : class Tax_CheckOperation attr_reader :adunme,:adpwd def intialize @adunme= @adpwd= end def setUserData(adunme,adpwd) @adunme=adunme @adpwd=adpwd end def login(ie) login script text_field.set(adunme) text_field.set(adpwd) end end Whearas in my script : taxChkMapper=Tax_CheckMapping.new taxChkOpr=taxChkMapper.returnExcelData(path of the excel file,’TC1’) TC1 is my identifier for test cases taxChkOpr.each do |eachIns| eachIns.login(ie) end So per say if my login method is not defined in the class Tax_CheckOperation I wont be able to access my variables ‘adunme’ and ‘adpwd’. I have also used the ‘’send’’ method as well but that’s not being fruitful either, Hope now the things are clearer for you guys to help me. Since I am not calling the method with the object of the class but instance of an array object. Thanks Rohan Ojha -Original Message- From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] On Behalf Of George Sent: Friday, July 31, 2009 8:39 AM To: Watir General Subject: [wtr-general] Re: Help with class,method,objects Are you using the Excel interface class from Watir's site? http://wiki.openqa.org/display/WTR/Excel+interface+class On Jul 29, 9:57 pm, Rohan Ojha rohan.o...@bsil.com wrote: Hi All, I am not too sure whether I should post it here or in a Ruby forum. But there is a problem that I am facing while scripting a data driven Watir suite. 1) I have a class (say the base class) wherein I am fetching data from excel and storing them in a variable. 2) Now there's a generic method in the application which is stored in another Ruby file (not in a class, not in a module) 3) I need to call this generic method with the object of the base class (since the object has the data allotted to the variables) 4) But when I do this it says undefined method `methodName' for main:Object. So can somebody help me with this? What can I do so that I can access the methods and at the same time the data is set to variables for every row of excel sheet. Thanks in advance. Thanks, Rohan Ojha Blue Star Infotech l*+91 900 4955058l * +91 22 6688 6969 l 6 +91 22 6688 6999 l * mailto:rohan.o...@bsil.com rohan.o...@bsil.com http://www.bsil.com/www.bsil.com- Where Partnerships Are Built on Trust --~--~-~--~~~---~--~~ 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: Firewatir XPIs for Firefox 3.5.x
Thanks, Angrez...this really helped! :) On Jul 31, 12:47 am, Angrez Singh ang...@gmail.com wrote: Hi, The XPIs for Firefox 3.5.x versions are there on WIKI. You can download them from: http://wiki.openqa.org/display/WTR/FireWatir+Installation Let us know if you face any problems while installing/using the XPIs for Firefox 3.5 Thanks, Angrez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Problem setting select_list using an array index
I have a select_list with values of Coke, Pepsi, and Sprite. I need to set the value to Coke using an array index as follows: ie.select_list( :id, 'id' ).select( #{$org[0]} ) I have a function get_orgs that builds the $org[] array by reading lines from a text file in the same directory, as follows: def get_orgs f = File.open(orgs.txt, r) f.each_line {|line| $org.push line } f.close end The orgs.txt file contains three lines as follows: Coke Pepsi Sprite The problem is, when I run this, I get c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb: 82:in `select_item_in_select_list': No option with text of Coke (Watir::Exception::NoValueFoundException) But if I build the array as $org = [Coke, Pepsi, Sprite] then there's no problem. What's the problem here? Isn't the array exactly the same either way? Thanks Randy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] Re: Problem setting select_list using an array index
Have you stripped the newlines when you get the input? The way you have it now, $org is ['Coke\n','Pepsi\n','Sprite\n'] Also, is there a reason $org is a global variable? Having global vars can be dangerous if they're not needed. You might try something like this: org=[] def get_orgs(org) f=File.open(orgs.txt,r) f.each{|line| org.push line.gsub(\n,)} f.close return org end org=get_orgs(org) ie.select_list(:id,'id').select(org[0]) -Dylan On Jul 31, 2:58 pm, infoDrone xrandywe...@yahoo.com wrote: I have a select_list with values of Coke, Pepsi, and Sprite. I need to set the value to Coke using an array index as follows: ie.select_list( :id, 'id' ).select( #{$org[0]} ) I have a function get_orgs that builds the $org[] array by reading lines from a text file in the same directory, as follows: def get_orgs f = File.open(orgs.txt, r) f.each_line {|line| $org.push line } f.close end The orgs.txt file contains three lines as follows: Coke Pepsi Sprite The problem is, when I run this, I get c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/input_elements.rb: 82:in `select_item_in_select_list': No option with text of Coke (Watir::Exception::NoValueFoundException) But if I build the array as $org = [Coke, Pepsi, Sprite] then there's no problem. What's the problem here? Isn't the array exactly the same either way? Thanks Randy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Watir General group. To post to this group, send email to watir-general@googlegroups.com Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to watir-general-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/watir-general -~--~~~~--~~--~--~---
[wtr-general] How to get the Scite editor's error message in a notepad?
Hi i am a newbie to Watir, Just i want to collect the log messages from the Scite editor and save in a notepad. If any methods are available to do that please post. Thanks, Prince3105 --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---