unable to enter value in iframe popup window.

21 views
Skip to first unread message

kot bangalore

unread,
Feb 7, 2014, 3:09:43 AM2/7/14
to webd...@googlegroups.com
Hi All

unable to enter value in iframe popup window.
I request you all please help me to implement this scenario.

i have tried this code also
, but i dont have luck so far

        driver.switchTo().frame(driver.findElement(By.cssSelector("#single-course-registration")));
AND
        driver.switchTo().defaultContent();

requesting please refer screen schoot1 and screen schoot2


Thanks in advance.

Screenshoot1.png
Screenshoot2.png

darrell

unread,
Feb 7, 2014, 9:56:43 AM2/7/14
to webd...@googlegroups.com
I went to the URL you provided and there is no element with id='single-course-registration' on the page let alone an iframe. I found an anchor with an href containing 'single-course-registration' and I found two iframes. To click on the email link you need to find the element for the email link, which is NOT in an iframe. Once you find the element, click it. This will cause the iframe to become visible. You then need to find the iframe and switch to it. In comments:

    // find the anchor element
    // click the anchor element
    // find the iframe element
    // switch to the iframe element

at this point you can find elements on the iframe and interact with them. If you close the iframe you need to switch back to the default content before you attempt to interact with it.
Reply all
Reply to author
Forward
0 new messages