Reputation: 2289
I want to automate text writing in popup. Is it possible? if yes, then please guide me. Any help will be well appreciated.
Upvotes: 1
Views: 3436
Reputation: 2289
I got the solution:
driver.switchTo().frame(0);
driver.findElement(By.id("id of the view to enter text in the popup")).sendKeys("some text to enter");
Upvotes: 2
Reputation: 1869
If it's a browser popup, it sounds like you're looking for:
driver.switchTo().alert().sendKeys("some text to enter");
Upvotes: 2