0

Java code

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

C#?

chengbo
  • 5,759
  • 4
  • 26
  • 41
DoodleKana
  • 2,036
  • 4
  • 27
  • 44
  • 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
  • Thanks @AnthonyChu It is what I was looking for – DoodleKana Sep 18 '14 at 17:00

1 Answers1

-1
IJavaScriptExecutor js = driver as IJavaScriptExecutor; 
string title = (string)js.ExecuteScript("window.open();");
Richard
  • 8,663
  • 3
  • 35
  • 46
DoodleKana
  • 2,036
  • 4
  • 27
  • 44