[ 
http://jira.openqa.org/browse/WTR-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=20081#action_20081
 ] 

Alan Baird commented on WTR-472:
--------------------------------

Actually, I was going to open a ticket on that issue as well but this one 
prevented me from investigating it.  The problem is that IE8 opens 2 processes 
for the first window and another process for each subsequent open.  
Unfortunately, the process id that is returned when Process.create is called 
(this is the Process from win32-process) doesn't consistently return the right 
process id when more than one window is opened.  I don't fully understand all 
of the reasons for this, but it's definitely the cause.

I'm not sure why Watir::IE.new would be non-standard.  I never considered 
switching since I didn't need multi-browser support and didn't feel the need to 
change my scripts.  The reason I'm using .new_process instead of new is that 
this has been the recommended way of opening the browser in several 
watir-general emails where browser performance has been discussed.  I had some 
performance problems with Watir::IE.new and it was resolved by switching to 
.new_process.

I've been using Watir::IE.new this morning and that gets me around the problem, 
but I think this could also affect .click_no_wait as I've been having issues 
with it as well.  Ultimately, this code should fail gracefully if it can't find 
the window it's looking for.

I'll try to do some more investigation on this later.

> Issues with Watir::IE::Process.start_process and new_process
> ------------------------------------------------------------
>
>                 Key: WTR-472
>                 URL: http://jira.openqa.org/browse/WTR-472
>             Project: Watir
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 1.6.7
>         Environment: windows 7 IE 8
>            Reporter: Alan Baird
>            Priority: Major
>
> I noticed this on Ruby 1.8.7:
> {code}
> c:\>pik switch 1.8.7
> c:\>ruby -v
> ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
> c:\>gem list watir
> *** LOCAL GEMS ***
> watir (1.7.0, 1.7.0.rc1, 1.6.7)
> c:\>irb --noreadline
> irb(main):001:0> require 'watir'
> => true
> irb(main):002:0> br = Watir::IE.new_process
> NoMethodError: undefined method `visible' for [#<Watir::IE:0x57f6900 
> url="about:blank" title="">]:Array
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:230:in
>  `visible='
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:170:in
>  `initialize_options'
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:121:in
>  `_new_process_init'
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:113:in
>  `new_process'
>         from (irb):2
> irb(main):003:0> br = Watir::IE.start_process
> NoMethodError: undefined method `visible' for [#<Watir::IE:0x57f2850 
> url="about:blank" title="">]:Array
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:230:in
>  `visible='
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:170:in
>  `initialize_options'
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:121:in
>  `_new_process_init'
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:113:in
>  `new_process'
>         from 
> C:/ruby/Ruby-187-p302/lib/ruby/gems/1.8/gems/watir-1.7.0/lib/watir/ie-class.rb:128:in
>  `start_process'
>         from (irb):3
> {code}
> I'm not sure what is causing this.  I don't see this behavior with 1.8.6.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.openqa.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to