I am beginner in webdriver started learning page object model
Here is the code i use:
public static class test1
{
public static ISearchContext Driver
{
get
{
return webDriver;
}
}
}
public static class test2
{
public static test3 test3
{
get
{
var Test3 = new test3();
PageFactory.InitElements(test1.Driver, Test3 );
return Test3 ;
}
}
}
public class test3
{
public void SwitchToFrame()
{
test1.Driver.SwitchTo().Frame(webDriver.FindElement(By.XPath("some xpath")));
}
}
this keeps throwing an error.
SwitchTo
is never given as option , Can any one tell me why , Please tell me how to get SwitchTo
as option.
Thanks in advance