Advertisement
Guest User

Untitled

a guest
Nov 27th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. public static class test1
  2. {
  3. public static ISearchContext Driver
  4. {
  5. get
  6. {
  7. return webDriver;
  8. }
  9. }
  10. }
  11.  
  12. public static class test2
  13. {
  14. public static test3 test3
  15. {
  16. get
  17. {
  18. var Test3 = new test3();
  19. PageFactory.InitElements(test1.Driver, Test3 );
  20. return Test3 ;
  21. }
  22. }
  23. }
  24.  
  25. public class test3
  26. {
  27. public void SwitchToFrame()
  28. {
  29. test1.Driver.SwitchTo().Frame(webDriver.FindElement(By.XPath("some xpath")));
  30.  
  31. }
  32. }
  33.  
  34. public static IWebDriver Driver
  35. {
  36. get
  37. {
  38. return webDriver;
  39. }
  40. }
  41.  
  42. driver.switchTo().Frame("YourFrameName");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement