lundi 25 juillet 2016

After sending text to ckeditor it does not recognize next element (selenium)

i successfully send text to ck editor through these command

WebElement iframe = driver.findElement(By.tagName("iframe"));
driver.switchTo().frame(iframe);
WebElement tinymce = driver.findElement(By.tagName("body"));
tinymce.clear();
tinymce.sendKeys("Automation Description");

Problem

Text "Automation Description" is succesfully passed to ckeditor. But. it does locate the next element Following error is displayed

 no such element: Unable to locate element: {"method":"xpath","selector":".//*[@id='select2-state_name-container']"}

When i add Block Comment to

WebElement iframe = driver.findElement(By.tagName("iframe"));
driver.switchTo().frame(iframe);
WebElement tinymce = driver.findElement(By.tagName("body"));
tinymce.clear();
tinymce.sendKeys("Automation Description");

It successful locate the next element.

Help me to add a command so that i can locate next element after texting text to ckeditor. Thank you

Aucun commentaire:

Enregistrer un commentaire