[wtr-general] Re: How access tabs in Firefox?

2008-10-23 Thread al3kc
Michael Hwee wrote: Did you try with object instance? ff = FireWatir::Firefox.new.attach(:title,/Title/) This code works but still does not solve the problem :) When I click a link the new page is opened in the same window in ACTIVE tab. So I can click anything in this tab and I do not

[wtr-general] Re: Problems using visible

2008-10-23 Thread al3kc
Should this work for FireWatir? I tried to change it for FireWatir::Element but it doesn't work. Željko Filipin [EMAIL PROTECTED] wrote: On Mon, Sep 8, 2008 at 5:48 PM, Bret Pettichord [EMAIL PROTECTED] wrote: I think you need to require something before using this method. Any one?

[wtr-general] Ruby While Loop

2008-10-23 Thread jas . shelton
All, I currently have a while loop that iterates as long as the cell it is checking an Excel is not nil. I want to add a if statement in this while loop that, if the 'if' condition is met, will add 1 to the loop iterator, and restart the while loop, without executing the rest of the code in the

[wtr-general] How to determine a container type from a variable assignment

2008-10-23 Thread niartseoj
Hello I'm trying to find the method to run in order to determine if a variarable is a container and if so what sort of container it is. I'm doing this because i have to loop through a table, and identify if there is a cell that contains a link with a matching name and a certain type of image

[wtr-general] Re: click_no_wait doesn't work when called again

2008-10-23 Thread Bret Pettichord
What happens if you change the second call to click_no_wait to call click instead. Do you get an error? What is the error message? Bret babylonrei wrote: 2008/10/22 Bret Pettichord [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] What happens if you add a sleep statement at the location

[wtr-general] Re: How to determine a container type from a variable assignment

2008-10-23 Thread niartseoj
Well the exist? did not work as i need to handle situations when the $atag variable is not assigned.. On Oct 23, 10:49 am, niartseoj [EMAIL PROTECTED] wrote: I was able to get my script to work using an exists? however i'm still curious as to how to evaluate if an object of if the container

[wtr-general] Re: Ruby While Loop

2008-10-23 Thread Charley Baker
while(input.Range(b#{x})[' Value'] != nil) if(input.Range(a#{x})['Value'] == 'no') x +=1 next end end On Thu, Oct 23, 2008 at 8:01 AM, [EMAIL PROTECTED] wrote: All, I currently have a while loop that iterates as long as the cell it is checking an Excel is not nil. I want to

[wtr-general] Re: How to determine a container type from a variable assignment

2008-10-23 Thread niartseoj
I was able to get my script to work using an exists? however i'm still curious as to how to evaluate if an object of if the container type. Been looking through element.rb and contain.rb but my ruby skills are neewbie level 1. Thanks for your time On Oct 23, 10:13 am, niartseoj [EMAIL

[wtr-general] How to access a child object

2008-10-23 Thread LanOK
I need to access an object (picture). I know that it's flex object. I don't know a method which can reach an element OBJECT If anybody knows, please help. I thing may be there're any node method (child nodes) which can help to access this object

[wtr-general] Re: How to determine a container type from a variable assignment

2008-10-23 Thread niartseoj
Hello Bret, Thanks for taking time to help me. You were able to descripher my example perfectly and your suggestion works great. I learned a great deal from this example, thanks again for your time. On Oct 23, 12:04 pm, Bret Pettichord [EMAIL PROTECTED] wrote: Thanks for sharing your code. I

[wtr-general] Re: How to access a child object

2008-10-23 Thread LFIdnl
Initially you should to add new tag (if watir doesn't support 'object' tag): module Watir class Object NonControlElement TAG = 'OBJECT' end end And after use: ie.frame(:id, 'url').object(:id, 'flexApp') I didn't test it but i think it must work :) On 23 окт, 19:44, LanOK [EMAIL

[wtr-general] Re: How to determine a container type from a variable assignment

2008-10-23 Thread Bret Pettichord
Great. I hope others reading can also understand this solution and realize that it represents a general solution to a common problem that people often ask about. The problem: How do i find a page element that meets a complex set of criteria, possibly including relationships with other

[wtr-general] Re: Problems using visible

2008-10-23 Thread Bret Pettichord
This code is IE specific. al3kc wrote: Should this work for FireWatir? I tried to change it for FireWatir::Element but it doesn't work. Željko Filipin [EMAIL PROTECTED] wrote: On Mon, Sep 8, 2008 at 5:48 PM, Bret Pettichord [EMAIL PROTECTED] wrote: I think you need to require

[wtr-general] table row_count incorrect

2008-10-23 Thread Paul Denize
The following watir code is enough to demonstrate the flaw in the row_count method. The table has 2 rows - but watir return 6. The problem is tables embedded in tables and the rowcount simply counting TR tags from the outside. Therefore it counts inner table rows as well Code can then fail

[wtr-general] Re: table row_count incorrect

2008-10-23 Thread Paul Denize
This is not the only routine and while digging I found comments like # This method returns the table as a 2 dimensional array. Dont expect too much if there are nested tables, colspan etc. All the routines seem to use the following process rows = table object.getElementsByTagName(TR).length

[wtr-general] Re: table row_count incorrect

2008-10-23 Thread Paul Denize
Overloading the following seems to get past the limitations. Perhaps someone with more DOM experience can comment if there are any dangers One thin I did notice is that it picks up TH data cells just like TD ones class Table def row_count assert_exists return

[wtr-general] Re: table row_count incorrect

2008-10-23 Thread Alan Baird
Paul - This issue is WTR-26 (http://jira.openqa.org/browse/WTR-26)http://jira.openqa.org/browse/WTR-26, it's been around for a while. Your solution looks like the one that is in this ticket. Alan On Thu, Oct 23, 2008 at 9:10 PM, Paul Denize [EMAIL PROTECTED]wrote: Overloading the following