Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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")));
- }
- }
- public static IWebDriver Driver
- {
- get
- {
- return webDriver;
- }
- }
- driver.switchTo().Frame("YourFrameName");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement