IFrame in Selenium

0 votes

I am not able to use send_key() function for IFrame using Selenium WebDriver. How should I select the IFrame and which element should be used for send_key()? Below is the IFrame html code:

<iframe class="iframe" src="/framework/blank.html" style="width: 99%; border-width: 1px; height: 300px;">
#document
<html webdriver="true">
<head>
</head>
<body> … </body>
</html>
</iframe>

How to send this value to the description?

The code of this frame is not being viewed when I use "view page source " in the browser.

May 11, 2018 in Selenium by ana1504.k
• 7,870 points
232 views

1 answer to this question.

0 votes

You can try out the belo code:

driver.switch_to.frame(driver.find_element_by_tag_name("iframe")) 

To use the default content you should try:  driver.switch_to.default_content()

answered May 11, 2018 by Meci Matt
• 9,400 points

Related Questions In Selenium

0 votes
1 answer

How to choose the correct iframe in Selenium WebDriver?

When I checked the website you've mentioned, ...READ MORE

answered Apr 29, 2018 in Selenium by king_kenny
• 3,610 points
208 views
0 votes
1 answer

Identifying the page iframe in Selenium using Java Code

Open the page in a browser and ...READ MORE

answered May 24, 2018 in Selenium by Samarpit
• 5,130 points
86 views
0 votes
3 answers

How to specify "ENTER" button functionality in Selenium WebDriver code?

using OpenQA.Selenium.Interactions; Actions builder = new Actions(driver); ...READ MORE

answered Feb 12 in Selenium by anonymous
7,534 views
0 votes
1 answer

How can we take screenshots of tests in Selenium 2 using C#

We can take screenshots using below function ...READ MORE

answered Mar 23, 2018 in Selenium by nsv999
• 5,050 points
142 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,050 points
406 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
762 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
402 views
0 votes
1 answer

How can I Install Selenium IDE in Firefox

Selenium IDE works with all Firefox versions, ...READ MORE

answered Apr 13, 2018 in Selenium by Meci Matt
• 9,400 points
86 views
0 votes
1 answer

XPath for the elements with no ID or Name in Selenium Webdriver

Use like this or similar to this: //div[@id="top-level-menu-item-3"]/div[@class="filter-label"] //div[@id="top-level-menu1"] ...READ MORE

answered Apr 17, 2018 in Selenium by Meci Matt
• 9,400 points
1,111 views