Hi orde again, thanks a lot for your super sweet and quick response
^_^ ! KISS !

On Aug 12, 2:03 pm, orde <ohil...@gmail.com> wrote:
> >1. Verify text in a new opened page?
>
> browser.text.include?("string_to_verify")  # assuming you've attached
> to the new page
>
> > 2. Verify some condition in current page?
>
> Just an example: browser.link(:id, 'id').exists?
>
> And you would probably want to put that into a begin/rescue/end
> statement to handle a failure case gracefully:
>
> begin
>   # assert/verify something (e.g. browser.text.include?
> ("string_to_verify"))
> rescue
>   # log the failure if it fails.
> end
>
> For some info on exception handling, check 
> outhttp://ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html(or
> your favorite .rb reference doc).
>
> Hope it helps.
>
> orde
>
> On Aug 12, 1:22 pm, Chan Nguyen <atbl1...@gmail.com> wrote:
>
> > Hi everyone,
> > I encountered a problem that when clicking on a link, it will open a
> > separate page. In other words, I will have 2 pages, so if I want to
> > verify the web is doing correctly? What should I do?
> > 1. Verify text in a new opened page?
> > 2. Verify some condition in current page?
> > For both 1 & 2, I don't really know how to start? Can anyone share me
> > an example?
> > Thanks,

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

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

Reply via email to