Sunday, March 29, 2015

How to handle CK editor and enter text in that?

String CWH= driver.getWindowHandle();
  WebElement iframe = driver.findElement(By.tagName("iframe"));
  driver.switchTo().frame(iframe );
  WebElement sat= driver.findElement(By.tagName("body"));
  sat.click();
  sat.sendKeys("Sample text");
  driver.switchTo().window(CWH);

No comments:

Post a Comment

TestNG - Can i use the 2 different data providers to same @test methods in TestNG?

public Object [][] dp1 () { return new Object [][] { new Object [] { "a" , "b" }, new Obje...