1

I'm creating a new tests with selenium in my job. But i can't get one element in my system. We use Prime Faces and i can't get this element. I need to send a value to him, and He is a iFrame.

I tried to use Selenium IDE but i had no success. When I try to get the xPath, i get /htm/body :( Someone know how i can get the full path of this element?

I'm using Selenium Web Driver.

Thanks in advance

1

after a little searching, I found this solution

driver.switchTo().frame(find(By.id("id_frame")));
find(By.xpath("/html/body")).click();

WebElement editable = driver.switchTo().activeElement(); 

editable.clear();
editable.sendKeys("Your text here"); 

driver.switchTo().defaultContent();
find(By.xpath("btn_save")).click();

worked very well

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.