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

Скачать или смотреть ✔

  • Rex Jones II
  • 2019-03-25
  • 5245
✔
  • ok logo

Скачать ✔ бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно ✔ или посмотреть видео с ютуба в максимальном доступном качестве.

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

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

Cкачать музыку ✔ бесплатно в формате MP3:

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

Описание к видео ✔

Selenium frame (WebElement) –
Many applications contain an unnoticeable frame or iframe which requires a switch before executing the next statement. With Selenium, we can use 3 methods to switch to a frame. The methods are frame (WebElement), frame (String), and frame (index). Watch the following video which shows how to switch to a frame using frame (WebElement).

► View All Videos On LinkedIn = https://tinyurl.com/LI-Selenium-4-Beg...
► View All Videos On YouTube (Caption or Non-Caption) = https://tinyurl.com/YT-Selenium-4-Beg...
► View All Videos On Facebook (Caption or Non-Caption) = https://tinyurl.com/FB-Selenium-4-Beg...

► Download Transcript, Presentation, and Source Code = https://www.rexjones2.com/switch-to-f...
► View Transcript, Presentation, and Source Code via github = https://github.com/RexJonesII/Seleniu...

► Free Selenium PDF Book: https://www.rexjones2.com/book-seleni...
► Free Java PDF Book: https://www.rexjones2.com/book-part-1...
► All Paperback & eBooks: http://tinyurl.com/Rex-Allen-Jones-Books

► Increase Video Quality: Settings - Quality - Select HD
► CC Font Size: Settings - Subtitles/CC - Options - Font Size
► Turn CC On or Off: Click CC

► Transcript
Let’s walkthrough our Application Under Test https://paytm.com/ . First, we load the application then click the Log In/Sign Up hyperlink. Next, we click the link at the bottom “Login/Signup with mobile number and password”. Finally, we enter our number or email.

This Test Script will Fail and throw an exception if we do not switch to a frame but which step requires a switch. We are going to switch after clicking the Log In/Sign Up hyperlink.
Let’s go to Eclipse and create our Automation Test Script. We setup our Test with System.setProperty on Chrome using driver = new ChromeDriver(); then maximize the window driver.manage().window().maximize;

The Test method is switchToFrames. Now load the AUT. driver.get, https://paytm.com . Add a dynamic Wait statement. This here is an Explicit Wait Statement for 5 seconds. Why add a wait statement?

We are going wait until 24x7 Help shows up. I am going to reload the page and you will see how we wait until 24x7 Help and these other elements show up. Finish the wait statement. You can watch video number 22 to see the benefits of an Explicit Wait. Now we click the Log In/Sign Up hyperlink. driver.findElement By xpath dot click. The xpath value will contain text for Log In/Sign Up then wait for this dialog to load. We are going to wait for the bottom hyperlink because that’s the link we will click.

This is a customized xpath value for Log In/Sign Up. I will create a video explaining how to create customized xpath values. We add the wait statement then click the hyperlink at the bottom.

Last, we enter the phone number or email. driver.findElement By id dot sendKeys Get the value for id Inspect the element. We see the value for id is input_0 send (123) 456-7890.

Let’s Run.

Nothing happens after clicking the Log In/Sign Up hyperlink. Our test failed.
Let’s go back to our AUT and see why it failed. Right click and we see View Frame Source. That means this dialog is a frame or an iframe. It is like the example from our Introduction when looking at frames in W3 Schools. Notice the difference when I right click outside the iframe. We do not see View Frame Source. That lets us know we must switch before performing a command.

Go back to Eclipse and switch to frame. driver.switchTo. The description states “Sends future commands to a different frame or window”. In this intellisense, we see different methods for switching to a frame or window. We are going to switch to a frame.

Here’s the frame methods, we reviewed in our introduction. frame(index) selects a frame by it’s zero based index. frame(String) selects a frame by its name or ID. frame(WebElement) selects a frame using it’s element. Select frame.

Now, let’s inspect an element within the iframe dialog. We are going to inspect the bottom link. The blue highlighted part is the link but let’s scroll up to the iframe tag. This iframe tag has an src attribute that contains login. CTRL + F to find the value. Let’s write our customized xpath value.

2 forward slashes
Iframe
Opening and Closing brackets
contains
Opening and Closing parenthesis
At symbol
src which is the attribute name
comma
2 single quotes
login is written inside the single quotes
The yellow highlight indicates we have located the iframe.

Copy the value
Now, let’s switch to the iframe. driver dot findElement By xpath then paste the value.
Let’s Run. We see phone number (123) 456-7890.

#SeleniumTraining #SeleniumAutomation #BeginnerSeleniumTutorials #SeleniumWebDriver

Комментарии

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

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

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

video2dn Copyright © 2023 - 2025

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