Re: [wtr-general] watir 2.0.1 table rows method broken

2011-08-26 Thread Michael
Thanks for the update and workaround Alister. I'll add the 'if Watir do it that 
way, else do it the compatible way' to my code.

I'll look forward to a fix in a future version of Watir. :-)


On 2011-08-24, at 7:48 PM, Alister Scott wrote:

> Yeah, it looks bust.
> You can use:
> 
> browser.table(:id, 'administrators').each do |row| 
>   puts 
>   puts row.inspect 
>   puts row.text 
> end 
> 
> which works, but isn't watir-webdriver compatible.
> 
> Cheers,
> Alister
> 
> 
> -- 
> 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

-- 
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] IE 9 execute_script broken

2011-08-26 Thread Michael
What version of Watir should I expect to see that fix in? 2.0.2 when it comes 
out?

On 2011-08-24, at 9:32 PM, parolkar wrote:

> Hi Michael,
>  This was a bug which was fixed in this commit :
> https://github.com/bret/watir/commit/f9b351c99352160d6becec4bd1ec1d54f570bc18
>  Are you still facing this issue, bring it to my attention in detail
> and I will look at it :-)
> 
> -parolkar
> 
> On Aug 12, 11:10 pm, Michael  wrote:
>> Hello,
>> 
>> I am recently trying to run our tests on IE 9, and am running into the
>> following error. It occurs both with Watir 1.9.2 and 2.0.1, does
>> anyone have a solution? We are using Ruby 1.9.2.
>> 
>> We have extended the Waitr Element as follows (and with similar code
>> for deny):
>> module Watir
>> class Element
>> 
>> def confirm
>> page_container.execute_script("window.alert = 
>> function() {return
>> true;}")
>> page_container.execute_script("window.confirm = 
>> function() {return
>> true;}")
>> self
>> end # end confirm method
>> 
>> end # end Element class
>> end # end Watir module
>> 
>> Then when trying to suppress the JavaScript popups on certain buttons
>> we'd do something like:
>> browser.button( :name, 'aButton' ).confirm.click
>> 
>> This works great in IE 7 and 8 on Windows XP. On Windows 7 using IE 9
>> we get the following error:
>>   NoMethodError: unknown property or method: `eval'
>>   HRESULT error code:0x80020006
>>   Unknown name.
>>   HTML saved in logs\html/CleanupInstance/
>> testDeleteUserClasses.0.html
>> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-2.0.1/lib/watir/
>> ie-class.rb:415:in `method_missing'
>> C:/Ruby192/lib/ruby/gems/1.9.1/gems/watir-2.0.1/lib/watir/
>> ie-class.rb:415:in `execute_script'
>> P:/release-71/test/watir/core/watir/Element.rb:12:in
>> `confirm'
>> P:/release-71/test/watir/configuration/pam/
>> ReplicatedCheckinCheckoutCleanup.rb:45:in `testDeleteUserClasses'
>> 
>> Any suggestions or ideas would be greatly appreciated.
>> 
>> Michael
> 
> -- 
> 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

-- 
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] watir: how to select li link with id from a jquery dynamic list

2011-08-26 Thread mo10soccer
Using Watir 2.0, Ruby 1.8.7:

I have a dynamic Div that contains


someText



someText

SomeText

This list is in a modal "jquery pop up form". So I want to click on
any . and after I click on the link, another set of 's will
appear, that I need to select from as well. So my problem is how to
select the li even though they are not in the page, because they are
dynamically generated by the server based on the user click. Also do I
need to wait for it to load. I am a Watir newbie so please the more
detail the better.

Here is my current code:

#this will launch the jquery form successfully
ie.link(:id, "launchIndustry").click_no_wait

#this is the  that contain all the 's
ie.wait_until {ie.div.dl(:id, "container_dl").exists? }
puts ie.div.dl(:id, 'container_dl').exists? # good up to here

ie.wait_until {ie.div.li(:id, "firstLink").exists? }
ie.div(:id => "industry").li(:id => "firstLink").click


The error that I get is:

timed out after 60 seconds, which means that the script can't the
first li element. Please help, because I have to select these options
before I can move forward as it's a required field.

Any help is appreciated.

Thanks

-- 
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] Need idea to compare 2 sheets

2011-08-26 Thread Željko Filipin
Watir just drives browsers. It does not know anything about open office. Try
roo gem for that.

On Friday, August 26, 2011, jp  wrote:
> HI,
> Pl give me an idea how to compare the 2 open office calc sheet in
> watir.
>
>
> --
> 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
>

-- 
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] Ruby 1.9.2 and Watir 2.01 indexing compatibility

2011-08-26 Thread George Wiley
I ran across an issue with Ruby 1.9.2, Watir 2.01 and compatibility with 
older versions without zero based indexing.

I'm running on Win7, IE8. I have a page with 5 radio buttons with the below 
option set in my code. 

Watir.options[:zero_based_indexing] = false 

Here is my code: 

ie.radios[5].click 
ie.radios[4].click 
ie.radios[3].click 
ie.radios[2].click 
ie.radios[1].click 

This does not work. I get an error for index 5. I assumed that my old code 
would be able to run in the zero based indexing environment with the above 
option set.

This code works fine: 

ie.radios[4].click 
ie.radios[3].click 
ie.radios[2].click 
ie.radios[1].click 
ie.radios[0].click   # zero based indexing 

Is this the way it is supposed to work for radio buttons?

-- 
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] Need idea to compare 2 sheets

2011-08-26 Thread jp
HI,
Pl give me an idea how to compare the 2 open office calc sheet in
watir.


-- 
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] logic to compare the two sheets in watir

2011-08-26 Thread jp
Hi,

  I have a query,

  I want to compare the two sheets.my first sheet have the result i
was typed manually and my second sheet have the result coming from the
web page..

Iam not clear in this concept..
i want to compare sheet1 and sheet 2both data's in the sheet will
correct or not?
Is thr any method available in watirscript to compare the 2 sheets?


Sheet1 have

Designation :TestAnalyst
Appraiser : Nirmal
Reviewer:sethu
DOJ :18-04-2010
Business Title :
Entity  :   cubixmarg Pvt Ltd
Office  :   South Wing
Office Email :  kumar.s...@in.cmn.com
Office Mobile :
IPLC :

Sheet 2 data also same..

Can any one guide me pl.
ham new to watir...



-- 
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: getAllContents equivalent in watir-webdriver?

2011-08-26 Thread joedio
Abe,

In Watir look  for 'options'  and 'selected_options'  in the class
Watir::SelectList
In watir-webdriver look  for 'options'  and 'selected_options'  in the
class Watir::Select

Joe


On Aug 25, 1:32 pm, Abe Heward  wrote:
> In Watir you can get an array of all items in a selection list menu.
>
> This method appears to be missing from watir-webdriver.
>
> I've looked through the RDocs for watir-webdriver, but can't seem to find
> the equivalent method. Am I blind, or is there no such method?

-- 
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] watir-webdriver can not work on chrome with Browser.windows

2011-08-26 Thread ge bt
Dear:
   My environment is ruby1.8.7 ,watir2.01 . watir-webdriver0.3.2
windowsxp sp3  .I use the function

browser.window(:url=>/my.jsp/).use do
 browser.radio(:index,0).click
end

to operating the popu window by chrome and  I have  got a error
message when the function is over

Watir::Container#iframe is replaced by Watir::Container#frame
C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/response.rb:45:in `assert_ok': Internal
Chrome error during 'GetIndicesFromTab': (Could not find tab among
current browser windows). Request details:
({"command":"GetIndicesFromTab","tab_id":4}).
(Selenium::WebDriver::Error::UnhandledError)
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/response.rb:15:in `initialize'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/http/common.rb:53:in `new'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/http/common.rb:53:in `create_response'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/http/default.rb:56:in `request'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/http/common.rb:34:in `call'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/bridge.rb:406:in `raw_execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/bridge.rb:384:in `execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/remote/bridge.rb:190:in `getWindowHandles'
from C:/Ruby187/lib/ruby/gems/1.8/gems/selenium-webdriver-2.3.2/lib/
selenium/webdriver/common/target_locator.rb:39:in `window'
from C:/Ruby187/lib/ruby/gems/1.8/gems/watir-webdriver-0.3.2/lib/
watir-webdriver/window_switching.rb:99:in `use'
from ieselectpopu.rb:21


but I Can  use this method successfully by  IE and firfox  both

-- 
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