Could it be a problem with timing?

Try:

Watir::wait.until(30) { self.text.match(/There is a problem with/) }

if(self.text.match(/There is a problem with/))

self.link(:name, 'override').click.
end

Another thing you can do is install pry ('gem install pry') and then put a 
breakpoint in front of the code that's failing:


binding.pry
if(self.text.match(/There is a problem with/))

self.link(:name, 'override').click.
end

Then run the script and it'll stop in a pry session right at the failure point 
(pry is just like irb)





On Tuesday, November 12, 2013 4:18 AM, sumanth <[email protected]> 
wrote:
 
Hi All,

I am facing issue while running my scripts [which are running fine with 
IE10-Win8] in IE11-Windows8.1
script is coming to ssl warning page where my scripts try to click override 
link if the text "there is a problem with ...." text is present

code looks something like

if(self.text.match(/There is a problem with/))

self.link(:name, 'override').click.
end

problem is, when I run the scripts it is not entering into the loop itself as 
it is not matching the condition. So I have commented the if condition and 
tried to click override directly. and even this time, script could not click 
the link and thrown a error saying unknown object.


Interestingly, when I use IRB, the same code works fine.

I am really confused what is going wrong here. 

Any help would be really appreciated.

Thanks
Sumanth


-- 
-- 
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/groups/opt_out.

-- 
-- 
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/groups/opt_out.

Reply via email to