C# White Framework Automation: How to check if a page was opened

502 views Asked by At

I have to write white/c# code to check if a confirmation page was opened after clicking a button. If it didn't open it means there was some sort of problem and the test needs to fail. Afterwards i need to use that page in order to push another button on it.

Anyone know how to do that using white/c# syntax ?

Thanks in advance

LE: this is what i wrote

public virtual void gotoSave(String Option)
{
    btnSave.Click();
    if (Option == "Save")
    {
         btnSave.Click();
    }
}

and in the Test in am writing

depositPage.gotoSave();

where depositPage is the Father page

When clicking on save I need to assert if a Confirmation Page has been opened, if not the test has to fail.

I know how to get pages using GetPage<>() directive but I shouldn't have to do that.

0

There are 0 answers