My test is:
@browser = Watir::Browser.new internet_browser
@browser.goto("192.168.1.1")
(1..24).each do |i|
       puts @browser.table(:id => "tableCounts").tr(:index => 3).td(:index
=> i).text
end

When the test is inside the loop the page reloads and I have an exception.
I want to have all data only one time and then ask about them.


On 30 April 2014 14:06, Oscar Rieken <[email protected]> wrote:

> I would guess you could grab all the elements you want once the page
> loads.
> But to me a page reloading every 2 seconds seems like a very bad design :)
>
>
> On Wed, Apr 30, 2014 at 6:50 AM, Luis Espla <[email protected]> wrote:
>
>> Hello,
>> I have a test that it reads a lot of data in a html page. This page
>> reload every 2 seconds and I receive this error message:
>>
>> `assert_ok': Element is no longer valid
>> (Selenium::WebDriver::Error::StaleElementReferenceError)
>>
>> The problem is I read first  and then I read again but the DOM changed. I
>> would like to read only one time and then ask for different fields. How can
>> do it?. Because right now I have dove my own function, this function read
>> browser.html  and then I parse the field with ruby code.
>>
>> Sincerely regards
>>
>> --
>> --
>> Before posting, please read http://watir.com/support. In short: search
>> before you ask, be nice.
>>
>> [email protected]
>> http://groups.google.com/group/watir-general
>> [email protected]
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Watir General" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> --
> Before posting, please read http://watir.com/support. In short: search
> before you ask, be nice.
>
> [email protected]
> http://groups.google.com/group/watir-general
> [email protected]
>
> ---
> You received this message because you are subscribed to the Google Groups
> "Watir General" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

[email protected]
http://groups.google.com/group/watir-general
[email protected]

--- 
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to