Re: [wtr-general] Re: Unable to identify the object error
Hi Darryl, Thanks for the feedback. I have checked but found that the application contains no frames. irb(main):012:0 browser.goto'1.2.3.4' = 21.233967 irb(main):013:0 browser.show_frames there are 0 frames = 0..-1 Sudeep On Fri, Dec 10, 2010 at 6:25 AM, Darryl Brown d-l-br...@roadrunner.comwrote: Hi Sudeep, Does the page you are testing have frame sets? Start an irb session and go to your web page. Example: C:\irb irb(main):001:0 require 'watir' = true irb(main):002:0 ie = Watir::IE.new = #Watir::IE:0x28b3038 url=about:blank title= irb(main):003:0 ie.goto '1.2.3.4' = 5.343 irb(main):004:0 ie.show_frames there are 3 frames frame index: 1 name: companyArea frame index: 2 name: tabArea frame index: 3 name: infoArea = 0..2 irb(main):005:0 You can also search this site for WebMetrics. It's supposed to be a recorder but recorders are bad. It is a nice helper tool for beginners because it will show you what a nested expression looks like for Watir. Don't expect to record and play back scripts. It ain't gonna happen. Regards, Darryl On Dec 8, 1:35 am, sudeep pattnaik sudeeppattn...@gmail.com wrote: Hi, The page I am testing, gets loaded after the login page. I have written Watir script for logging in also which works fine. The problem is Watir scxript is not able to locate any of the elements on the page even if I have tried to access them using different parameters like :name,:id,:text etc. Is there any specific reasons for this? Initially I thought my Ruby installation got corrupted, but surprsingly it works fine for other applications. Please advise. Thanks in advance. Regards, Sudeep On Mon, Dec 6, 2010 at 7:38 PM, sudeep pattnaik sudeeppattn...@gmail.comwrote: Hi Željko, You are right. when the page is loaded, the select is there and the value in it is none and by default it gets set to Operational Control in a span of 2 secs. So I think I have to make the control wait for the time till the value gets changed to Operational Control and then set it to Audits. Sudeep. On Mon, Dec 6, 2010 at 7:22 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Dec 6, 2010 at 2:42 PM, Sudeep sudeeppattn...@gmail.com wrote: browser.select_list(:name,ModuleID).set(Audits) option value=13nbsp;nbsp;nbsp;Audits Maybe one of these would work: browser.select_list(:name,ModuleID).set( Audits) browser.select_list(:name,ModuleID).set(/Audits/) Does this flash the select list? browser.select_list(:name,ModuleID).flash Is the select list on the page? Maybe it appears later, or it is hidden. Željko -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com watir-general%2bunsubscr...@googlegroups.comwatir-general%252bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Unable to identify the object error
Hi, The page I am testing, gets loaded after the login page. I have written Watir script for logging in also which works fine. The problem is Watir scxript is not able to locate any of the elements on the page even if I have tried to access them using different parameters like :name,:id,:text etc. Is there any specific reasons for this? Initially I thought my Ruby installation got corrupted, but surprsingly it works fine for other applications. Please advise. Thanks in advance. Regards, Sudeep On Mon, Dec 6, 2010 at 7:38 PM, sudeep pattnaik sudeeppattn...@gmail.comwrote: Hi Željko, You are right. when the page is loaded, the select is there and the value in it is none and by default it gets set to Operational Control in a span of 2 secs. So I think I have to make the control wait for the time till the value gets changed to Operational Control and then set it to Audits. Sudeep. On Mon, Dec 6, 2010 at 7:22 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Dec 6, 2010 at 2:42 PM, Sudeep sudeeppattn...@gmail.com wrote: browser.select_list(:name,ModuleID).set(Audits) option value=13nbsp;nbsp;nbsp;Audits Maybe one of these would work: browser.select_list(:name,ModuleID).set( Audits) browser.select_list(:name,ModuleID).set(/Audits/) Does this flash the select list? browser.select_list(:name,ModuleID).flash Is the select list on the page? Maybe it appears later, or it is hidden. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Unable to identify the object error
Hi, I am getting the following error while setting a value to the drop down list. Watir Script : browser.select_list(:name,ModuleID).set(Audits) HTML Code: select style=display:inline; sourcetype:module; targetid:divModule; font-size: 8pt; COLOR: #33; font-family: Verdana; width:280px onchange=populateDIV(this); ModuleID_onChange(); onmouseout=hidePathOnPop();this.style.textDecoration='none';this.style.color ='#00'; onmouseover=this.style.textDecoration='underline';this.style.color ='#0033CC'; id=ModuleID name=ModuleID class=sysNavbarActiveSearch size=1 option value=cap lt; Module gt;/option option value=13nbsp;nbsp;nbsp;Audits option value=19nbsp;nbsp;nbsp;Document Control option value=83nbsp;nbsp;nbsp;Master Incident option value=917nbsp;nbsp;nbsp;mdole option value=915nbsp;nbsp;nbsp;Module12 option value=916nbsp;nbsp;nbsp;Module123 option value=9nbsp;nbsp;nbsp;Operational Control option value=909nbsp;nbsp;nbsp;play8 option value=80nbsp;nbsp;nbsp;Quality Nonconformance option value=70nbsp;nbsp;nbsp;Standard Nonconformance /select Error in the console : C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb: 58:in `assert_exists': Unable to locate element, using :name, ModuleID Watir::Exception::UnknownObjectException) from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ input_eleme nts.rb:64:in `select_item_in_select_list' from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ input_eleme nts.rb:48:in `set' from Intelex_Audit_1.txt:11 I am not able to find the reason why is it not able to find the Object with name ModuleId whereas in the HTML it is clearly mentioned as the name. Please can you help me out? Regards, Sudeep -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Unable to identify the object error
Hi Prajakta, It did not work out :( :( . Sudeep On Mon, Dec 6, 2010 at 7:16 PM, Prajakta Jadhav jadhav.praja...@gmail.comwrote: Try using value of the option instead of label. E.g: browser.select_list(:name,ModuleID).set(13) -Prajakta On Mon, Dec 6, 2010 at 7:12 PM, Sudeep sudeeppattn...@gmail.com wrote: Hi, I am getting the following error while setting a value to the drop down list. Watir Script : browser.select_list(:name,ModuleID).set(Audits) HTML Code: select style=display:inline; sourcetype:module; targetid:divModule; font-size: 8pt; COLOR: #33; font-family: Verdana; width:280px onchange=populateDIV(this); ModuleID_onChange(); onmouseout=hidePathOnPop();this.style.textDecoration='none';this.style.color ='#00'; onmouseover=this.style.textDecoration='underline';this.style.color ='#0033CC'; id=ModuleID name=ModuleID class=sysNavbarActiveSearch size=1 option value=cap lt; Module gt;/option option value=13nbsp;nbsp;nbsp;Audits option value=19nbsp;nbsp;nbsp;Document Control option value=83nbsp;nbsp;nbsp;Master Incident option value=917nbsp;nbsp;nbsp;mdole option value=915nbsp;nbsp;nbsp;Module12 option value=916nbsp;nbsp;nbsp;Module123 option value=9nbsp;nbsp;nbsp;Operational Control option value=909nbsp;nbsp;nbsp;play8 option value=80nbsp;nbsp;nbsp;Quality Nonconformance option value=70nbsp;nbsp;nbsp;Standard Nonconformance /select Error in the console : C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/element.rb: 58:in `assert_exists': Unable to locate element, using :name, ModuleID Watir::Exception::UnknownObjectException) from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ input_eleme nts.rb:64:in `select_item_in_select_list' from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ input_eleme nts.rb:48:in `set' from Intelex_Audit_1.txt:11 I am not able to find the reason why is it not able to find the Object with name ModuleId whereas in the HTML it is clearly mentioned as the name. Please can you help me out? Regards, Sudeep -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Unable to identify the object error
Hi Željko, You are right. when the page is loaded, the select is there and the value in it is none and by default it gets set to Operational Control in a span of 2 secs. So I think I have to make the control wait for the time till the value gets changed to Operational Control and then set it to Audits. Sudeep. On Mon, Dec 6, 2010 at 7:22 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Mon, Dec 6, 2010 at 2:42 PM, Sudeep sudeeppattn...@gmail.com wrote: browser.select_list(:name,ModuleID).set(Audits) option value=13nbsp;nbsp;nbsp;Audits Maybe one of these would work: browser.select_list(:name,ModuleID).set( Audits) browser.select_list(:name,ModuleID).set(/Audits/) Does this flash the select list? browser.select_list(:name,ModuleID).flash Is the select list on the page? Maybe it appears later, or it is hidden. Željko -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: How to select a value from a drop down list
Thanks Darryl. In fact I am very new to WATIR. Will try to get my answers from the tutorials sent by you. Sudeep. On Sat, Dec 4, 2010 at 10:29 PM, Darryl Brown d-l-br...@roadrunner.comwrote: Hi Sudeep, The best way to get help here is to try first. What did you try? You seem to be very eager to learn about Waitr. A suggestion for you would be to read the Watir tutorial located here:http:// wiki.openqa.org/display/WTR/Tutorial. The answer to your particular question can be found within: http://wiki.openqa.org/display/WTR/Simple. Best regards, Darryl On Dec 4, 6:00 am, Sudeep sudeeppattn...@gmail.com wrote: Hi, Please can you let me know how to select a value from the drop down list through WATIR script? The HTML is as follows. div class=row id=genderFld label class=label for=gendercollectionGender/label div class=collection id=gendercollection select title=Gender class= id=gender name=gender option value= SELECTED - Select One -/option option title=m value=m Male/option option title=f value=f Female/option /select /div div class=msgContainer div class=icon/div p id=genderFldMsg/p /div Regards, Sudeep -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-general%0awatir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] How to select a value from a drop down list
Hi, Please can you let me know how to select a value from the drop down list through WATIR script? The HTML is as follows. div class=row id=genderFld label class=label for=gendercollectionGender/label div class=collection id=gendercollection select title=Gender class= id=gender name=gender option value= SELECTED - Select One -/option option title=m value=m Male/option option title=f value=f Female/option /select /div div class=msgContainer div class=icon/div p id=genderFldMsg/p /div Regards, Sudeep -- 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] Error in script as button is disable for some time
Hi, I am automating an application which adds goals for the day. It contains a text area in which a goal is written and when the Submit Goal is clicked, it is added to the Goal List. The user then can add the next goal. When the goal is being addeed to the goal list, till the action is completed, the Add Goal button remains disabled and after the goal is added, the button is enabled again to add the next goal. As the script does not take into account the disable time of the button, it is throwing an error message while running the WATIR script which says the button is disabled. following is my code: require rubygems require watir url=http://ourgoalplan.com; browser=Watir::IE.start(url) putsTest Started browser.text_field(:name,txtName).set(sudeepp) browser.text_field(:name,txtPassword).set(x) browser.button(:name,btnLogin).click #This is Goal 1 browser.text_field(:name,ucAddGoal$txtAddGoal).set(Execute RUBY WATIR programs.) browser.button(:name,ucAddGoal$btnAddGoal).click #This is Goal 2 browser.text_field(:name,ucAddGoal$txtAddGoal).set(Execute the testcases for page level elements.) browser.button(:name,ucAddGoal$btnAddGoal).click putsGoals added The button remains disabled for sometime when a goal is added to the goal list. Please can you suggest a way to get rid of this. Do we have any feature to make the control wait for sometime till the button is enabled again. Thanks in advance, Sudeep. -- 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] Error while running script
Hi, I got the following error after the line which is inin the script below. C:\Documents and Settings\sudeepp\Desktop\Ruby Programsruby GPS_GoalEntry.rb.txt Test Started C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ input_elements.rb:374:in `method_missing': select (WIN32OLERuntimeError) OLE error code:800A025E in Unknown No Description HRESULT error code:0x800a025e from C:/Ruby186/lib/ruby/gems/1.8/gems/watir-1.6.7/lib/watir/ input_eleme nts.rb:374:in `set' from GPS_GoalEntry.rb.txt:23 while the following script was run : require rubygems require watir url=http://ourgoalplan.com; browser=Watir::IE.start(url) putsTest Started browser.text_field(:name,txtName).set(sudeepp) browser.text_field(:name,txtPassword).set(m...@jan1) browser.button(:name,btnLogin).click browser.text_field(:name,ucAddGoal$txtAddGoal).set(AA.) browser.button(:name,ucAddGoal$btnAddGoal).click sleep 1 until browser.button(:name,ucAddGoal$btnAddGoal).enabled? browser.text_field(:name,ucAddGoal$txtAddGoal).set(BB) browser.button(:name,ucAddGoal$btnAddGoal).click sleep 1 until browser.button(:name,ucAddGoal$btnAddGoal).enabled? browser.text_field(:name,ucAddGoal$txtAddGoal).set(CC) browser.button(:name,ucAddGoal$btnAddGoal).click sleep 1 until browser.button(:name,ucAddGoal$btnAddGoal).enabled? browser.text_field(:name,ucAddGoal$txtAddGoal).set(DD) browser.button(:name,ucAddGoal$btnAddGoal).click putsGoals added Please can you let me know the reason??? Thanks Regards, Sudeep -- 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] If-Else and loops
Hi, Please can you let me know how to write IF..ELSE and loops in WATIR with example?? Sudeep -- 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] Error message while typing the command require 'Watir'
Hi, I have just started writing scripts in WATIR. When I write the command gem -v I am getting the result as 1.3.7 . But I am getting the following error in the command prompt while I write the command : require 'Watir' or require 'watir' It shows the following error message C:\Documents and Settings\sudeeppirb irb(main):001:0 require 'Watir' LoadError: no such file to load -- Watir from (irb):1:in `require' from (irb):1 irb(main):002:0 require 'watir' LoadError: no such file to load -- watir from (irb):2:in `require' from (irb):2 Please can you guide me as I am completely new to writing scripts in WATIR. Do I need to load some files to get rid of this error??? Thanks in advance, Sudeep. -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Error message while typing the command require 'Watir'
Hi Željko, Thanks for the guidance. If i write only the command require watir then it is giving the result as false. but after writing require rubygems it is returning the value as true. The following is the result: C:\Documents and Settings\sudeeppirb irb(main):001:0 require watir LoadError: no such file to load -- watir from (irb):1:in `require' from (irb):1 irb(main):002:0 require rubygems = true irb(main):003:0 require watir = true FYI, I have installed Ruby 1.8.6 and installed WATIR using the command gem install watir . Regards, Sudeep On Fri, Nov 26, 2010 at 4:50 PM, Željko Filipin zeljko.fili...@wa-research.ch wrote: On Fri, Nov 26, 2010 at 12:10 PM, Sudeep sudeeppattn...@gmail.com wrote: require 'Watir' or require 'watir' You should only use require 'watir' irb(main):002:0 require 'watir' LoadError: no such file to load -- watir Do you have Watir installed? Try this from command line: gem list watir Also, maybe you have to require rubygems first. Try this in IRB: require rubygems require watir Željko -- watir.com - community manager watirpodcast.com - host testingpodcast.com - audio podcasts on software testing. all of them -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comwatir-general%2bunsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Writing and running WATIR scripts
Hi, I am completely new to WATIR. I have installed Ruby 1.9.2 and have also installed WATIR by the command: gem install watir WATIR has been installed but I donot know how to write the WATIR scripts and how to run them. Actually I know the syntax of writing it but do not know where to write and how to save and run it. Like for HTML we write it in Notepad and save with an extension name of .htm . The same way please can you tell me the procedure for writing and executing a WATIR script. Thanks in advance, Sudeep -- 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: Writing and running WATIR scripts
Hi Prajakta, Thank you for the reply. The screenshot shows that SCITE edito has been used. Do I need to download SCITE editor?? On Nov 18, 12:07 pm, Prajakta Jadhav jadhav.praja...@gmail.com wrote: oops.. wrong link... this is the correct one:http://ruby.about.com/od/beginningruby/ss/visualinstal_7.htm On Thu, Nov 18, 2010 at 12:37 PM, Prajakta Jadhav jadhav.praja...@gmail.com wrote: Find the information here:http://screencast.com/t/k5LGJDT0Dap On Thu, Nov 18, 2010 at 12:28 PM, Sudeep sudeeppattn...@gmail.com wrote: Hi, I am completely new to WATIR. I have installed Ruby 1.9.2 and have also installed WATIR by the command: gem install watir WATIR has been installed but I donot know how to write the WATIR scripts and how to run them. Actually I know the syntax of writing it but do not know where to write and how to save and run it. Like for HTML we write it in Notepad and save with an extension name of .htm . The same way please can you tell me the procedure for writing and executing a WATIR script. Thanks in advance, Sudeep -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.comhttp://groups.google.com/group/watir-generalwatir-general+unsubscribe...- Hide quoted text - - Show quoted text - -- 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