[wtr-general] Re: Help: File Size defining with Cucumber Watir.
I didn't understand what's the exact problem. Could you be more specific what you'd want to exactly do? Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Dec 19, 5:02 am, Irfan Ahmed irfan...@gmail.com wrote: Hi, I am working for automation with Cucumber and watir in a software company. I have a problem while working windows component for uploading I need to do the following: *Given /^I have selected a logo ([^]*) of size (\d+) MB$/ do |arg1, arg2| * * browser.file_field(:name, file).set(arg1)* *end* * * But, I am having problem to get to the file size to pass this test. I need to compare the file size with the given size. Anybody, please help me as soon as possible. -- Thanks, Irfan Ahmed Rizvi (Sagar) cell Numbers: +880 1676 246 991 +880 1723 712 888 Tasawr Interactive http://www.tasawr.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] Re: Automating Windows and Their Controls With Ruby
That would be great. Please don't forget to give any feedback after you've tried it. Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Dec 18, 11:27 pm, Arto Vuori vuo...@iki.fi wrote: Appears promising! I'm about to extend my watir test suite to interact with non-ie windows. I'll give your lib a try. --Arto On 18 joulu, 01:14, Jarmo jarm...@gmail.com wrote: I'm pretty sure that some of you already have noticed the library i've made to automate windows and their controls. I've now written a short blog post about it. http://www.itreallymatters.net/post/2352350743/automating-windows-and... If that thing seems to work well then what do you think if we'd replace AutoIt and win32-api in Watir with this eventually? I'd be happy to do that. Jarmo -- 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: Automating Windows and Their Controls With Ruby
Hi Jarmo, First I'll say - Great work on this gem!! I have been playing with this and it works very well. I did run into one thing that I'm not sure on though. If I click in a dialogue that launches a popup - window3.button(:value = Run).click, the script hangs and then times out. I don't see a click_no_wait method in the Rautomation::Button class. Is this something that will be considered. Perhaps a thread can be used to handle the popup - I'll try that next. Below is the irb session. After the timeout, I attach to the popup and finish the intended process . C:\irb irb(main):001:0 require rautomation = true irb(main):002:0 window1 = RAutomation::Window.new :title = /File Download/ = #RAutomation::Window:0x28e8ea4 @adapter=:ffi, @window=#RAutomation::Adapter ::Ffi::Window:0x2d7f5a8 @locators={:title=/File Download/} irb(main):003:0 window1.title = File Download - Security Warning irb(main):004:0 window1.button(:value = Save).click = true irb(main):005:0 window2 = RAutomation::Window.new :title = /Save/ = #RAutomation::Window:0x2d6ab30 @adapter=:ffi, @window=#RAutomation::Adapter ::Ffi::Window:0x2d6aa90 @locators={:title=/Save/} irb(main):006:0 window2.title = Save As irb(main):007:0 window2.button(:value = Save).click = true irb(main):008:0 window3 = RAutomation::Window.new :title = / Download/ = #RAutomation::Window:0x2d299c8 @adapter=:ffi, @window=#RAutomation::Adapter ::Ffi::Window:0x2d2984c @locators={:title=/Download/} irb(main):009:0 window3.title = Download complete irb(main):010:0 window3.button(:value = Run).click RAutomation::WaitHelper::TimeoutError: timed out after 60 seconds from c:/ruby/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ rautomation/wa it_helper.rb:20:in `wait_until' from c:/ruby/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ rautomation/ad apter/ffi/button.rb:25:in `click' from c:/ruby/lib/ruby/gems/1.8/gems/rautomation-0.3.0/lib/ rautomation/bu tton.rb:15:in `click' from (irb):10 irb(main):011:0 window4 = RAutomation::Window.new :title = /Internet Explorer/ = #RAutomation::Window:0x2d6e0b4 @adapter=:ffi, @window=#RAutomation::Adapter ::Ffi::Window:0x2d6dd1c @locators={:title=/Internet Explorer/} irb(main):012:0 window4.title = Internet Explorer - Security Warning irb(main):013:0 window4.button(:value = Run).click = true irb(main):014:0 Regards Darryl On Dec 19, 7:25 am, Jarmo Pertman jarm...@gmail.com wrote: That would be great. Please don't forget to give any feedback after you've tried it. Jarmo Pertman - IT does really matter -http://www.itreallymatters.net On Dec 18, 11:27 pm, Arto Vuori vuo...@iki.fi wrote: Appears promising! I'm about to extend my watir test suite to interact with non-ie windows. I'll give your lib a try. --Arto On 18 joulu, 01:14, Jarmo jarm...@gmail.com wrote: I'm pretty sure that some of you already have noticed the library i've made to automate windows and their controls. I've now written a short blog post about it. http://www.itreallymatters.net/post/2352350743/automating-windows-and... If that thing seems to work well then what do you think if we'd replace AutoIt and win32-api in Watir with this eventually? I'd be happy to do that. Jarmo -- 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: Help: File Size defining with Cucumber Watir.
Hi, Jarmo Pertman, Thanks for your response. Actually there was a problem to find out a file size for upload. Becuase, I need to know if the file size is more then something then the system will display a message xcvbnnm. Look at the step generated by cucumber: *Given /^I have selected a logo ([^]*) of size (\d+) MB$/ do |arg1, arg2| * * browser.file_field(:name, file).set(arg1)* *end* * this step will be passed if size of image file arg2 is the size equal to arg1. the file there I set (**browser.file_field(:name, file).set(arg1)) too upload a picture, I need to write a code to show that the file has a size of minimum requirement and so that I need to findout the size of that. So here I need to know how know a size of a picture or any file which are taken to upload. * On Sun, Dec 19, 2010 at 6:24 PM, Jarmo Pertman jarm...@gmail.com wrote: I didn't understand what's the exact problem. Could you be more specific what you'd want to exactly do? Jarmo Pertman - IT does really matter - http://www.itreallymatters.net On Dec 19, 5:02 am, Irfan Ahmed irfan...@gmail.com wrote: Hi, I am working for automation with Cucumber and watir in a software company. I have a problem while working windows component for uploading I need to do the following: *Given /^I have selected a logo ([^]*) of size (\d+) MB$/ do |arg1, arg2| * * browser.file_field(:name, file).set(arg1)* *end* * * But, I am having problem to get to the file size to pass this test. I need to compare the file size with the given size. Anybody, please help me as soon as possible. -- Thanks, Irfan Ahmed Rizvi (Sagar) cell Numbers: +880 1676 246 991 +880 1723 712 888 Tasawr Interactive http://www.tasawr.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 -- Thanks, Irfan Ahmed Rizvi (Sagar) cell Numbers: +880 1676 246 991 +880 1723 712 888 http://www.welltreat.us http://restaurant.welltreat.us/ http://isp.welltreat.us/ -- 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] HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in Unknown
HELP: FunFX + Watir not running in windowsXP:OLE error code:80020101 in Unknown Hello everybody, sorry for my poor english. I want to use the FunFX + Watir to test the Flex WEB applications in Windows, and the browser is IE7. But when the flex_app object call some method, it will give some error info. My system info: WinXP SP3 ruby 1.8.7 watir 1.6.7 funfx 0.2.2 my test sample is : require 'rubygems' require 'test/unit' require 'funfx' require 'funfx/browser/watir' class AccordionTest Test::Unit::TestCase @ie = Watir::IE.new() @ie.goto(http://funfx.rubyforge.org/Flex/FlexObjectTest/FlexObjectTest.html;) @flex = @ie.flex_app(FlexObjectTest,FlexObjectTest) puts @flex.methods tree = @flex.tree(:id='treeData').open(:item_renderer,Container controls) end run with this watir.rb: output log: ruby accordion_test.rb C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25:in `method_missing': unknown property or method `fireFunFXEvent' (WIN32OLERuntimeError) HRESULT error code:0x80020006 未知名称。 from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:25:in `fire_event' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27:in `fire_event' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55:in `flex_invoke' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26:in `fire_event' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:1087:in `open' from accordion_test.rb:14 to_yaml_style before_text horizontal_list labels set_container bar_chart ... i searched in the funfx group and found a method to change the watir.rb to test this, but it give the error info : run with this watir.rb: ruby accordion_test.rb C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41:in `method_missing': execScript (WIN32OLERuntimeError) OLE error code:80020101 in Unknown ��变虹�伴��璇� 80020101 ���瀵艰�存�ら」���浣娉�瀹��? HRESULT error code:0x80020009 发生意外。 from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:41:in `exec_script' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/browser/watir.rb:23:in `fire_event' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:27:in `fire_event' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:55:in `flex_invoke' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/element.rb:26:in `fire_event' from C:/Ruby187/lib/ruby/gems/1.8/gems/funfx-0.2.2/lib/funfx/flex/elements.rb:1087:in `open' from accordion_test.rb:14 typingspeed= to_yaml_style present? .. i checked the watir.rb file, and maybe this @ole_obj.ie.Document.parentWindow.execScript(js) execScript method not defined? someone can help me how to resolve this problem? ZTE Information Security Notice: The information contained in this mail is solely property of the sender's organization. This mail communication is confidential. Recipients named above are obligated to maintain secrecy and are not permitted to disclose the contents of this communication to others. This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the originator of the message. Any views expressed in this message are those of the individual sender. This message has been scanned for viruses and Spam by ZTE Anti-Spam system. -- 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 watir_bak.rb Description: Binary data watir.rb Description: Binary data