Re: [wtr-general] is possible to use existing browser in watir
On Mon, Nov 30, 2009 at 7:07 AM, Simbolla vinod...@gmail.com wrote: i was wondering that watir have feature to use existing ( ie already opened ) browser window. http://wiki.openqa.org/display/WTR/New+Browser+Windows Ž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
[wtr-general] Watir 1.6.5 and Ruby 1.9.1
Hi, I am trying to install Watir 1.6.5 on Ruby 1.9.1, but this is the issue. I am encountering: E:\gem install watir Building native extensions. This could take a while... ERROR: Error installing watir: ERROR: Failed to build gem native extension. E:/Ruby19/bin/ruby.exe extconf.rb checking for strncpy_s()... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=E:/Ruby19/bin/ruby E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to generat e an executable file. (RuntimeError) You have to install development tools first. from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:415:in `try_link0' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:419:in `try_link' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:527:in `try_func' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:772:in `block in have_func' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in postpo ne' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:270:in `postpone' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:771:in `have_func' from extconf.rb:9:in `main' Gem files will remain installed in E:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api- 1.4.5 for inspection. Results logged to E:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api-1.4.5/ext/gem_mak e.out Any suggestions? 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
Re: [wtr-general] Watir 1.6.5 and Ruby 1.9.1
The Ruby 1.9.1 installation works with firewatir on Ubuntu/linux however the windows installer is not yet completely done, this topic had been discussed on many other forums as well Karim Rayani On Mon, Nov 30, 2009 at 6:37 PM, aidy lewis aidy.le...@googlemail.comwrote: Hi, I am trying to install Watir 1.6.5 on Ruby 1.9.1, but this is the issue. I am encountering: E:\gem install watir Building native extensions. This could take a while... ERROR: Error installing watir: ERROR: Failed to build gem native extension. E:/Ruby19/bin/ruby.exe extconf.rb checking for strncpy_s()... *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=E:/Ruby19/bin/ruby E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to generat e an executable file. (RuntimeError) You have to install development tools first. from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:415:in `try_link0' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:419:in `try_link' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:527:in `try_func' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:772:in `block in have_func' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in postpo ne' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:270:in `postpone' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for' from E:/Ruby19/lib/ruby/1.9.1/mkmf.rb:771:in `have_func' from extconf.rb:9:in `main' Gem files will remain installed in E:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api- 1.4.5 for inspection. Results logged to E:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api-1.4.5/ext/gem_mak e.out Any suggestions? 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 -- 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 wait until an element is visible on a page
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] Trying to save an image
Hello, I am trying to save an image using the following: $ie.image(:index,1).save(c:\\test\\image.jpg) The image does get saved. However, I get the following (in irb)... WIN32OLERuntimeError: GoBack OLE error code:80004005 in Unknown No Description HRESULT error code:0x80020009 Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie- class.rb:36 2:in `method_missing' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ie- class.rb:36 2:in `back' from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.5/lib/watir/ image.rb:119:i n `save' from (irb):8 Any suggestions as to how to work around this? When running the above method in my script, it causes the whole script to abort after saving the image. Thanks in advance! -- 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] Relative path
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 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