Logo video2dn
  • Сохранить видео с ютуба
  • Категории
    • Музыка
    • Кино и Анимация
    • Автомобили
    • Животные
    • Спорт
    • Путешествия
    • Игры
    • Люди и Блоги
    • Юмор
    • Развлечения
    • Новости и Политика
    • Howto и Стиль
    • Diy своими руками
    • Образование
    • Наука и Технологии
    • Некоммерческие Организации
  • О сайте

Скачать или смотреть How to handle Nested iframes in Webpages Selenium WebDriver Automation with Selenium

  • Knowledge Share
  • 2020-11-06
  • 715
How to handle Nested iframes in Webpages Selenium WebDriver Automation with Selenium
  • ok logo

Скачать How to handle Nested iframes in Webpages Selenium WebDriver Automation with Selenium бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно How to handle Nested iframes in Webpages Selenium WebDriver Automation with Selenium или посмотреть видео с ютуба в максимальном доступном качестве.

Для скачивания выберите вариант из формы ниже:

  • Информация по загрузке:

Cкачать музыку How to handle Nested iframes in Webpages Selenium WebDriver Automation with Selenium бесплатно в формате MP3:

Если иконки загрузки не отобразились, ПОЖАЛУЙСТА, НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если у вас возникли трудности с загрузкой, пожалуйста, свяжитесь с нами по контактам, указанным в нижней части страницы.
Спасибо за использование сервиса video2dn.com

Описание к видео How to handle Nested iframes in Webpages Selenium WebDriver Automation with Selenium

In this session you will learn what are nested frames on a webpage and how to handle nested frames.

Please watch below basic session how to handle single frame so that it would be easy to understand this nested frames session
How to handle single frame on a webpage
https://studio.youtube.com/video/0tcP...

If you want to download the project/code, please download from below GitHub Repository
https://github.com/knowledgeshare-tec...

What is Nested iframe

An HTML iframe inside an another iframe is called Nested Iframe
To access elements of respective webelement in a iframe you have to switch to respective iframe
Switch to Frame

ByIndex driver.switchTo().frame(0)
By Name or ID driver.switchTo.frame(“Name or id of iframe”)
By WebElement driver.switchTo.frame(WebElement)

Switch to Main Frame / Parent Frame

driver.switchTo().parentFrame();
driver.switchTo().defaultContent();


Practice program on how to handle nested frame
============================================
package com.seleniumbasics;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.support.ui.Select;

public class nested_iframes_Example {

public static void main(String[] args) {
System.setProperty("webdriver.chrome.driver", ".\\drivers\\chromedriver.exe");
WebDriver driver=new ChromeDriver();
driver.navigate().to("https://chercher.tech/practice/frames...");
driver.manage().window().maximize();
int number_of_iframes=driver.findElements(By.tagName("iframe")).size();
System.out.println("Number of iframes on a page : " + number_of_iframes);

driver.switchTo().frame("frame1");
System.out.println("Switched to frame1");
driver.findElement(By.xpath("//input[@type='text']")).sendKeys("test");

driver.switchTo().frame("frame3");
System.out.println("Switched to frame3");
driver.findElement(By.xpath("//input[@type='checkbox']")).click();

driver.switchTo().defaultContent();
System.out.println("Switched to main content");

driver.switchTo().frame("frame2");
System.out.println("Switched to frame2");
Select animals =new Select(driver.findElement(By.id("animals")));
animals.selectByIndex(2);

driver.switchTo().defaultContent();
System.out.println("Switched to default content7");
String main_text=driver.findElement(By.xpath("(//span)[3]")).getAttribute("innerHTML");
System.out.println(main_text);

}

}

Комментарии

Информация по комментариям в разработке

Похожие видео

  • О нас
  • Контакты
  • Отказ от ответственности - Disclaimer
  • Условия использования сайта - TOS
  • Политика конфиденциальности

video2dn Copyright © 2023 - 2025

Контакты для правообладателей [email protected]