0

Java code

((JavascriptExecutor)driver).executeScript("window.open();");

C#?

chengbo
  • 5,789
  • 4
  • 27
  • 41
DoodleKana
  • 2,106
  • 4
  • 27
  • 45
  • 1
    Stack Overflow is a Question and Answer site, not a code translation service. Try to translate the code yourself first, then come to us when you are stuck, making sure to show us what you have tried. – gunr2171 Sep 18 '14 at 16:57
  • 2
    http://stackoverflow.com/questions/6229769/execute-javascript-using-selenium-webdriver-in-c-sharp – Anthony Chu Sep 18 '14 at 16:59

1 Answers1

-1
IJavaScriptExecutor js = driver as IJavaScriptExecutor; 
string title = (string)js.ExecuteScript("window.open();");
Richard
  • 8,961
  • 3
  • 38
  • 47
DoodleKana
  • 2,106
  • 4
  • 27
  • 45