Yes...

There are no menus or filters or drop downs on the page. 

My intent is clicking a link, taken to page, and checking some text on that 
page to ensure the link went to where I expected to go. 

The page in this case is a term of condition page which only has 
several paragraphs of text. I took a few words from the first line. 

I open to suggestions of a better to assert this page.

Thanks all

Ryan

On Thursday, October 18, 2012 3:58:00 PM UTC-7, Oscar.Rieken wrote:
>
> Yes, first
> You are doing an assertion in a when (in cucumber when is more for 
> changing state) 
> Second by ie.text I assume you are checking all of the text of the page 
> better to locate the exact text location 
>
> Can you give us more info on what you want to do 
>
> Sent from my iPhone
>
> On Oct 18, 2012, at 6:27 PM, Ry <cross...@gmail.com <javascript:>> wrote:
>
> Is there a better way to write this?
>  
> my goal to verifying text exists on the page and if it does to return to 
> previous page otherwise close the window
>  
> When /^I should be taken to the my text page$/ do
>
>            if ie.text('Modification of awesome things').visible? = true
>                then ie.back
>                     else ie.close
>       end
> end
>  
> my error when running this is 
>  
>  syntax error, unexpected keyword_else, expecting $end
>         else ie.close
>
> -- 
> Before posting, please read http://watir.com/support. In short: search 
> before you ask, be nice.
>  
> watir-...@googlegroups.com <javascript:>
> http://groups.google.com/group/watir-general
> watir-genera...@googlegroups.com <javascript:>
>
>

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

Reply via email to