How to get the number of frames on a webpage using webdriver?

0 votes
May 27 in Selenium by Esha
42 views

1 answer to this question.

0 votes

Hi Esha, you can get the number of frames on a webpage using webdriver with this code snippet:

List <WebElement> framesList = driver.findElements(By.xpath("//iframe"));
int numOfFrames = frameList.size();
answered May 27 by Rajesh

Related Questions In Selenium

0 votes
1 answer
+1 vote
2 answers

How to get the title of a webpage using Selenium Java?

Essentially, driver.getTitle(); function can be used to ...READ MORE

answered Dec 17, 2018 in Selenium by Vardhan
• 12,230 points
203 views
0 votes
1 answer
0 votes
1 answer
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,070 points
444 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
793 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
434 views
0 votes
1 answer
0 votes
1 answer

How to perform double click on a webpage using WebDriver?

Hey Jaya, to perform double click on ...READ MORE

answered May 31 in Selenium by Anvi
• 12,010 points
20 views