[wtr-general] Re: How to wait until an element is visible on a page
Why is it invalid? How is the div made invisible? If you look at watir/ contrib/visible.rb, then it checks against css style visibility: hidden or display: none. Is one of these in use? Jarmo On Nov 30, 10:39 pm, QAguy qablogm...@gmail.com wrote: I have this piece of code on a page I am trying to script against. div style= id=encoding_success class=encoding_complete p strongDone!/strong a id=video_url_link href=/video/show/4e9dd3b81c1cc3Go to your videoimg src=/images/pixel.gif?1246941735 class=icon double_arrow_icon alt=Pixel//a /p /div This div always exists, but it not always VISIBLE on the page. I want to create a wait until this element is visible on the page but not sure how to do this? Was thinking something like this but doesn't seem to work: Watir::Waiter::wait_until { @browser.div(:class, 'encoding_complete').visible? == true} but it doesn't work as I think the use of visible here is invalid. Hoping someone help me. Thanks QAguy -- 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: Relative path
Thanks Roshan, But i couldn't run the code. It gives me error. bad value for range (ArgumentError) So can you elaborate more? Thanks, Prince3105 On Dec 1, 11:04 am, Rohan Ojha rohan.o...@bsil.com wrote: Hi You can try this pathToTestFile = FileUtils::pwd basePath = pathToTestFile[0..(pathToTestFile.index('/Elcom'))] {Elcom is the base folder that is the outermost folder} $:.push(basePath+'Elcom/lib') {lib is the folder where I have stored my libraries} File.read(basePath+'Elcom\Elcom\test\Requistion Approval Plan\Test Data\automation.xls') {method to read the excel file which is stored } But for all this to function properly the folder structure has to be consistent throughout. Thanks Rohan Ojha -Original Message- From: Prince3105 [mailto:prince3...@gmail.com] Sent: Tuesday, December 01, 2009 10:51 AM To: Watir General Subject: [wtr-general] Relative path Hi Experts, I put my Test scripts, test data excel files and test cases file in one folder and doing testing. When i change the whole bunch to another system i am facing folder path issues. I was working QTP , where i can solve this problem by relative path. Please take a look on my below code. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares $excel = WIN32OLE.new(excel.application) $excel['Visible'] = true; $workbook = $excel.Workbooks.Open $excel_path $worksheet = $workbook.WorkSheets(4) $worksheet.Select So after searching rdoc i found one code and it returns the current path. But am unable to open the excel file. $excel_path = Dir.getwid + \\StoresSpares it gives the current file path as below E:/Data/Prince/WatIR/iComet/TestCases\\StoresSpares So my tests are failed. I need something like below $excel_path = RelativePath+(\\StoresSpares) It may not be a watir question but i dont have more experience in ruby. So please help me to solve this issue. 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 athttp://groups.google.com/group/watir-general -- 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] individual methods can work by itself. but they cannot work when they are group together?
Hi,all ! i want you help. i do not know why the individual methods can work by itself and no warning or error, but they can not work when they are group together. my method is below: require 'watir' require 'test/unit' require 'ci/reporter/rake/test_unit_loader.rb' require 'win32ole' require 'jcode' WIN32OLE.codepage = WIN32OLE::CP_UTF8 class GX_Reg Test::Unit::TestCase def setup #open test page by used this method WIN32OLE.codepage=WIN32OLE::CP_UTF8 @ie_site=web1.beijing.ecitysky.com @ie=Watir::IE.new @ie.goto @ie_site #...@ie.maximize @english=Array.new(7){(rand(122-97)+97).chr}.join @symbol=%w{! @ # $ % ^ * ( ) ★ ◆ ♀ ♂ 卐 ¢ ㊣ カ サ ケ セ フ モ ピ ビ ヂ ジ ギ ガ ザ ダポ ォヰ ( ⊙o⊙?) 莔rz ~~~^_^~~~ -_-# ?_? (#‵′)凸 8<} @chinese=%w{易 城 蓝 天 中 国 加 油 宫 心 计 曼 我 搭 踏 全 圈 咪 鬃 嘛 圣} @password=123456 @zone=%w{126 163 msn hotmail sina sohu yahoo gmail qq tom} @chinese_1=Array.new(7){...@chinese[rand(17).to_i.abs]}.join if @ie.li(:class,menuitem logout).exist? @ie.li(:class,menuitem logout).click end @sex=['mr','fr'] @sex_select...@sex[rand(2).to_i.abs] @ie.radio(:id,#...@sex_selected}).click @setHome=['prev','next'] @sethome_select...@sethome[rand(2).to_i.abs] @ie.span(:id,#...@sethome_selected}).click @ie.button(:id,fillRegInfo).click end def teardown #close webpage #...@ie.close end ## #使用126 163 msn hotmail sina sohu yahoo gamil qq tom的邮箱域名,来验证 #系统是否给出“访问邮箱“button。 ## def test_emailzone_register for i in 1..9 #automate to selete sex and homestead @sex_select...@sex[rand(2).to_i.abs] @ie.radio(:id,#...@sex_selected}).click @sethome_select...@sethome[rand(2).to_i.abs] @ie.span(:id,#...@sethome_selected}).click #try to click 立即加入button @ie.button(:id,fillRegInfo).click #input the info about the register user email=Array.new(6){(rand(122-97)+97).chr}.join+@+#...@zone [i]}+.com #english email address @english=Array.new(i){(rand(122-97)+97).chr}.join @ie.text_field(:id,username).set(#...@english}) @ie.text_field(:id,email).set(#{email}) @ie.text_field(:id,password).set(#...@password}) @ie.text_field(:id,passwordagain).set(#...@password}) @ie.text_field(:id,captcha).set(Watirb33f) @ie.button(:value,注册).click sleep 5 #匹配注册邮箱和“快速注册页面中显示的邮箱一样 #assert(#{email}=...@ie.p(:xpath,//d...@class='right']/div/div/p [...@class='center']).text,email is not right) #有访问邮箱按钮 assert(@ie.button(:value,访问邮箱).exist?,#{email} is not an exist zone email) #refresh the ie broswer @ie.refresh end end ## #使用其他的邮箱域名,验证系统不会给出”访问邮箱button ## def test_noemailzone_register #input the info about the register user email=Array.new(5){(rand(122-97)+97).chr}.join+@+Array.new(3) {rand(10).to_i.abs}.join+.com #english+num email address @ie.text_field(:id,username).set(#...@english}) @ie.text_field(:id,email).set(#{email}) @ie.text_field(:id,password).set(#...@password}) @ie.text_field(:id,passwordagain).set(#...@password}) @ie.text_field(:id,captcha).set(Watirb33f) sleep 3 @ie.button(:value,注册).click @ie.wait(5) assert(#{email}=...@ie.p(:xpath,//d...@class='right']/div/div/p [...@class='center']).text,email is not right) end end when they group togther, error will appear, the follow is that error: 2) Error: test_noemailzone_register(GX_Reg): Watir::Exception::UnknownObjectException: Unable to locate element, using :value, \327\242\262\341 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb: 56:in `assert_exists' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb: 288:in `enabled?' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb: 60:in `assert_enabled' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb: 233:in `click!' c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/element.rb: 219:in `click' 1.rb:92:in `test_noemailzone_register' only the first method can be run with no error, the second will not. Help me,Help me ! -- 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: Relative path
Thanks Rahul I already tried it returns the folder path but Watir expects the path like below. Otherwise it throws error due to some regular expression validation. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares Thanks, Prince3105 On Dec 1, 2:09 pm, Rahul S. Shetty rahulshe...@bsil.com wrote: Hey Prince, Can you try this: $excel_path = Dir.getwd + '/StoresSpares' (Use single quotes and front slash) Regards, Rahul S. Shetty -Original Message- From: Prince3105 [mailto:prince3...@gmail.com] Sent: Tuesday, December 01, 2009 10:51 AM To: Watir General Subject: [wtr-general] Relative path Hi Experts, I put my Test scripts, test data excel files and test cases file in one folder and doing testing. When i change the whole bunch to another system i am facing folder path issues. I was working QTP , where i can solve this problem by relative path. Please take a look on my below code. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares $excel = WIN32OLE.new(excel.application) $excel['Visible'] = true; $workbook = $excel.Workbooks.Open $excel_path $worksheet = $workbook.WorkSheets(4) $worksheet.Select So after searching rdoc i found one code and it returns the current path. But am unable to open the excel file. $excel_path = Dir.getwid + \\StoresSpares it gives the current file path as below E:/Data/Prince/WatIR/iComet/TestCases\\StoresSpares So my tests are failed. I need something like below $excel_path = RelativePath+(\\StoresSpares) It may not be a watir question but i dont have more experience in ruby. So please help me to solve this issue. 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 athttp://groups.google.com/group/watir-general -- 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 athttp://groups.google.com/group/watir-general -- 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] Featured on Watir podcast
Want to say to the world that you are using Watir? You can be featured person/company at http://watirpodcast.com/ for free. Let me know if you are interested. Željko -- watir.com - community manager watirpodcast.com - host -- 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
RE: [wtr-general] Re: Relative path
Ohk...Well then do try this...Even I have stumbled upon similar kind of issue before.. $excel_path = Dir.getwd + '/StoresSpares' $excel_path = $excel_path.gsub('/','\\') Let me know if this works. Just curious to know. Regards, Rahul S. Shetty -Original Message- From: Prince3105 [mailto:prince3...@gmail.com] Sent: Tuesday, December 01, 2009 3:59 PM To: Watir General Subject: [wtr-general] Re: Relative path Thanks Rahul I already tried it returns the folder path but Watir expects the path like below. Otherwise it throws error due to some regular expression validation. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares Thanks, Prince3105 On Dec 1, 2:09 pm, Rahul S. Shetty rahulshe...@bsil.com wrote: Hey Prince, Can you try this: $excel_path = Dir.getwd + '/StoresSpares' (Use single quotes and front slash) Regards, Rahul S. Shetty -Original Message- From: Prince3105 [mailto:prince3...@gmail.com] Sent: Tuesday, December 01, 2009 10:51 AM To: Watir General Subject: [wtr-general] Relative path Hi Experts, I put my Test scripts, test data excel files and test cases file in one folder and doing testing. When i change the whole bunch to another system i am facing folder path issues. I was working QTP , where i can solve this problem by relative path. Please take a look on my below code. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares $excel = WIN32OLE.new(excel.application) $excel['Visible'] = true; $workbook = $excel.Workbooks.Open $excel_path $worksheet = $workbook.WorkSheets(4) $worksheet.Select So after searching rdoc i found one code and it returns the current path. But am unable to open the excel file. $excel_path = Dir.getwid + \\StoresSpares it gives the current file path as below E:/Data/Prince/WatIR/iComet/TestCases\\StoresSpares So my tests are failed. I need something like below $excel_path = RelativePath+(\\StoresSpares) It may not be a watir question but i dont have more experience in ruby. So please help me to solve this issue. 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 athttp://groups.google.com/group/watir-general -- 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 athttp://groups.google.com/group/watir-general -- 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 -- 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: Relative path
Thanks Rahul Works like a charm. Thanks for your efforts. Thanks, Prince3105 On Dec 1, 3:38 pm, Rahul S. Shetty rahulshe...@bsil.com wrote: Ohk...Well then do try this...Even I have stumbled upon similar kind of issue before.. $excel_path = Dir.getwd + '/StoresSpares' $excel_path = $excel_path.gsub('/','\\') Let me know if this works. Just curious to know. Regards, Rahul S. Shetty -Original Message- From: Prince3105 [mailto:prince3...@gmail.com] Sent: Tuesday, December 01, 2009 3:59 PM To: Watir General Subject: [wtr-general] Re: Relative path Thanks Rahul I already tried it returns the folder path but Watir expects the path like below. Otherwise it throws error due to some regular expression validation. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares Thanks, Prince3105 On Dec 1, 2:09 pm, Rahul S. Shetty rahulshe...@bsil.com wrote: Hey Prince, Can you try this: $excel_path = Dir.getwd + '/StoresSpares' (Use single quotes and front slash) Regards, Rahul S. Shetty -Original Message- From: Prince3105 [mailto:prince3...@gmail.com] Sent: Tuesday, December 01, 2009 10:51 AM To: Watir General Subject: [wtr-general] Relative path Hi Experts, I put my Test scripts, test data excel files and test cases file in one folder and doing testing. When i change the whole bunch to another system i am facing folder path issues. I was working QTP , where i can solve this problem by relative path. Please take a look on my below code. $excel_path = e:\\Data\\Prince\\WatIR\\iComet\\TestCases\ \StoresSpares $excel = WIN32OLE.new(excel.application) $excel['Visible'] = true; $workbook = $excel.Workbooks.Open $excel_path $worksheet = $workbook.WorkSheets(4) $worksheet.Select So after searching rdoc i found one code and it returns the current path. But am unable to open the excel file. $excel_path = Dir.getwid + \\StoresSpares it gives the current file path as below E:/Data/Prince/WatIR/iComet/TestCases\\StoresSpares So my tests are failed. I need something like below $excel_path = RelativePath+(\\StoresSpares) It may not be a watir question but i dont have more experience in ruby. So please help me to solve this issue. 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 athttp://groups.google.com/group/watir-general -- 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 athttp://groups.google.com/group/watir-general -- 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 athttp://groups.google.com/group/watir-general -- 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 wait until an element is visible on a page
http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir I've used this: while (not $ie.html.include? my html) code to refresh page.-- won't auto-update puts not there yet ... sleep 5 end You can also use $ie.text.include? there are probably other ones too, but that's all I seem to need. You could also put in a timeout limit as well. Kim On Nov 30, 2:39 pm, QAguy qablogm...@gmail.com wrote: I have this piece of code on a page I am trying to script against. div style= id=encoding_success class=encoding_complete p strongDone!/strong a id=video_url_link href=/video/show/4e9dd3b81c1cc3Go to your videoimg src=/images/pixel.gif?1246941735 class=icon double_arrow_icon alt=Pixel//a /p /div This div always exists, but it not always VISIBLE on the page. I want to create a wait until this element is visible on the page but not sure how to do this? Was thinking something like this but doesn't seem to work: Watir::Waiter::wait_until { @browser.div(:class, 'encoding_complete').visible? == true} but it doesn't work as I think the use of visible here is invalid. Hoping someone help me. Thanks QAguy -- 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] Rescue
I'm using Watir to automate the testing of a report generated by MS SQL Reporting Services. The report generates 4 pages of output. Each page except the last one has a table which is addressable with Watir as follows: tbl = ie.frame(:id,'ReportFramectl144').frame (:id,'report').table(:class,'a3 r3') For whatever reason, the final page is addressed differently. It is: tbl = ie.frame(:id,'ReportFramectl144').frame (:id,'report').table(:class,'a3') So in order to handle this situation I placed the following 'begin - rescue - end' block inside a loop which is executed for each page of the output: begin tbl = ie.frame(:id,'ReportFramectl144').frame (:id,'report').table(:class,'a3 r3') puts A3 R3 rescue tbl = ie.frame(:id,'ReportFramectl144').frame (:id,'report').table(:class,'a3') puts A3 end My expectation is that any exception generated by the 'a3 r3' definition of tbl should cause the 'a3' definition of tbl to be executed. However, this is not happening. When the 'a3 r3' exception raises an exception, the script does not execute the rescue clause, nor does it skip the final execution of 'puts A3 R3. The complete output, run within Scite, is as follows: ruby wt_no_policy_claims_list_spec.rb A3 R3 A3 R3 A3 R3 A3 R3 F 1) Watir::Exception::UnknownObjectException in 'Wt No Policy Claims List No Policy Claims' Unable to locate element, using :class, a3 r3 wt_no_policy_claims_list_spec.rb:42: wt_no_policy_claims_list_spec.rb:26:in `loop' wt_no_policy_claims_list_spec.rb:26: wt_no_policy_claims_list_spec.rb:8: Finished in 7.032 seconds 1 example, 1 failure So 'rescue' doesn't seem to be working as advertised, at least as I understand it. Any wisdom would be much appreciated. -- 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 wait until an element is visible on a page
Yup, doing it using a text.include worked. Thanks for the help. QAguy On Dec 1, 9:42 am, KimBrown kimbro...@yahoo.com wrote: http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir I've used this: while (not $ie.html.include? my html) code to refresh page.-- won't auto-update puts not there yet ... sleep 5 end You can also use $ie.text.include? there are probably other ones too, but that's all I seem to need. You could also put in a timeout limit as well. Kim On Nov 30, 2:39 pm, QAguy qablogm...@gmail.com wrote: I have this piece of code on a page I am trying to script against. div style= id=encoding_success class=encoding_complete p strongDone!/strong a id=video_url_link href=/video/show/4e9dd3b81c1cc3Go to your videoimg src=/images/pixel.gif?1246941735 class=icon double_arrow_icon alt=Pixel//a /p /div This div always exists, but it not always VISIBLE on the page. I want to create a wait until this element is visible on the page but not sure how to do this? Was thinking something like this but doesn't seem to work: Watir::Waiter::wait_until { @browser.div(:class, 'encoding_complete').visible? == true} but it doesn't work as I think the use of visible here is invalid. Hoping someone help me. Thanks QAguy -- 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
Re: [wtr-general] Re: How to wait until an element is visible on a page
Hello, I usually use a simple Watir::Waiter::wait_until { @browser.div(:class, / encoding_complete/).exists? } Works like a charm. Fred Le 1 déc. 2009 à 17:25, QAguy a écrit : Yup, doing it using a text.include worked. Thanks for the help. QAguy On Dec 1, 9:42 am, KimBrown kimbro...@yahoo.com wrote: http://wiki.openqa.org/display/WTR/How+to+wait+with+Watir I've used this: while (not $ie.html.include? my html) code to refresh page.-- won't auto-update puts not there yet ... sleep 5 end You can also use $ie.text.include? there are probably other ones too, but that's all I seem to need. You could also put in a timeout limit as well. Kim On Nov 30, 2:39 pm, QAguy qablogm...@gmail.com wrote: I have this piece of code on a page I am trying to script against. div style= id=encoding_success class=encoding_complete p strongDone!/strong a id=video_url_link href=/video/show/4e9dd3b81c1cc3Go to your videoimg src=/images/pixel.gif?1246941735 class=icon double_arrow_icon alt=Pixel//a /p /div This div always exists, but it not always VISIBLE on the page. I want to create a wait until this element is visible on the page but not sure how to do this? Was thinking something like this but doesn't seem to work: Watir::Waiter::wait_until { @browser.div(:class, 'encoding_complete').visible? == true} but it doesn't work as I think the use of visible here is invalid. Hoping someone help me. Thanks QAguy -- 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 -- Frédéric de Villamil What's mine is mine. What's yours is still unsetteled – Go player proverb frede...@de-villamil.comtel: +33 (0)6 62 19 1337 http://t37.net Typo : http://typosphere.org -- 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: issue in entering value in text field
sorry for the delayed response...i already added this site as Trusted site still it is not working,But for the particular screen it shows Unknown Zone (Mixed) On Nov 26, 11:56 am, Ethan notet...@gmail.com wrote: You can try adding the relevant domain(s) you are using to the list of trusted sites in IE options. On Thu, Nov 26, 2009 at 08:13, kumar gki...@gmail.com wrote: Hi, You can not able to access the frame as your frames says access denied. This is cross domain issue which you can solve by adding the IP address in host file(Not sure whether it works in your case) Talk to your developers regarding this issue.They might help you. Regards, Kiran. On Nov 23, 11:32 pm, mohe j.mohanpra...@gmail.com wrote: I need to fill the 2 fields in my application(“Requester ID”,”Policy Number”). The issue is. these 2 fields are not recognize by watir and it throws error like “ c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/frame.rb:40:in `locate': Unable to locate a frame with name Main (Watir::Exception::UnknownFrameException) from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/ watir/frame.rb:47:in `initialize' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/ watir/container.rb:102:in `new' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/ watir/container.rb:102:in `frame' “ I went through all the forums and nothing is worked out My Observations: 1.When I highlight the field by Developer tool bar it shows only the frames, not element properties. Means I am not able to open highlighted frame(screenshot below) 2. “ie.show _frames” gives below result. there are 2 frames frame index: 1 name: Top frame index: 2 Access Denied 3.i tried all the combinations of code like below. $ie.frame(:name,Main).text_field(:name,txtRequestor).set(ABC) $ie.frame(:name,Main).frame(:name,Top).text_field (:name,txtRequestor).set(ABC) $ie.frame(:src,illustrations_body.aspx? PolicyNumber=).text_field(:name,txtPolicyNo).value=ABC 4.i have added this site as a trusted site in internet options. and also I tried to navigate this page by using “go to “ syntax I have attached my html code also .Could you me to get resolve this..Thank you. Html Code: /select/td /trtr id=TableRow5 td id=tableCell5 align=left colspan=1span id=Label2 style=font-weight:bold;Requestor ID:/span/tdtd id=tableCell6 align=left colspan=1input name=txtRequestor type=text maxlength=3 id=txtRequestor onblur=return ToUpperCase ( txtRequestor , 3) style=width:50px; //td /trtr id=TableRow6 td id=tableCell7 align=left colspan=1span id=Label3 style=font-weight:bold;Policy Number:/span/tdtd id=tableCell8 align=left colspan=1input name=txtPolicyNo type=text maxlength=10 id=txtPolicyNo onblur=return IsNumericlen ( txtPolicyNo , 8) style=width:80px; //td /trtr id=TableRow7 td id=tableCell9 align=left colspan=1 nbsp; /tdtd id=tableCell10 align=left colspan=1input type=submit name=btnEnter value= Enter onclick=Form_Validator(); id=btnEnter //td /tr /table /fieldset -- 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- 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] Does watir works on opera browser?
Hi, Kindly let me know,does watir works for Opera browser.If yes,please let me know the process. regards. Shraddha. -- 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] Chrome-Watir
Hi sai, Have you done with Chrome watir updation? -- 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: Does watir works on opera browser?
also let me know from where I can get gem for Opera Watir. On Dec 2, 9:41 am, shradha_Dalvi kshradh...@gmail.com wrote: Hi, Kindly let me know,does watir works for Opera browser.If yes,please let me know the process. regards. Shraddha. -- 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