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

Скачать или смотреть Selenium with C# 13 - Selenium Locators Best Practices | How to choose a right selenium locators

  • Ankpro Training
  • 2018-06-11
  • 4177
Selenium with C# 13 - Selenium Locators Best Practices | How to choose a right selenium locators
element locators in seleniumselenium locators best practiceselenium best practicesselenium design patterns and best practicesselenium selectors good practicesselenium practicesselenium locators tutorialselenium locatorsselenium good practicesseleniumselenium webdriverwebdriver good practiceslocator strategyselenium locator strategygood locatorsselenium good locatorswebdriver best practicesankpro seleniumankpro c# seleniumselenium c#
  • ok logo

Скачать Selenium with C# 13 - Selenium Locators Best Practices | How to choose a right selenium locators бесплатно в качестве 4к (2к / 1080p)

У нас вы можете скачать бесплатно Selenium with C# 13 - Selenium Locators Best Practices | How to choose a right selenium locators или посмотреть видео с ютуба в максимальном доступном качестве.

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

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

Cкачать музыку Selenium with C# 13 - Selenium Locators Best Practices | How to choose a right selenium locators бесплатно в формате MP3:

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

Описание к видео Selenium with C# 13 - Selenium Locators Best Practices | How to choose a right selenium locators

Selenium Locators Best Practices
Like our facebook page www.facebook.com/ankprotraining


Selenium Locators Best Practices :
1. If you have access to the developers ask them to add the IDs to elements

2. If application under test has lot of dynamic ids, target the stable part of the id

ex: lessthan span id='myproduct-1234' greaterthan Xyz mobile phone lessthan /spangreaterthan

Then target only ‘myproduct’

3. Your order of locator should be

If your target is single element
Id - Name - CSS Selector -Xpath(Relative)
If your target is multiple elements
ClassName - TagName - CSS Selector - Xpath(Relative)
If your target element is a link with shorter link text
LinkText - href
If your target element is a link with longer link text
PartialLinkText - href

4. Keep your XPath or CSS short

EX: Instead of //div/table[@id=‘mytable’]
use //*[id=‘mytable’]
instead of div table #mytable
use #mytable

5. If you do not get a element with Id or Name use the parent or child element as your reference in your relative xpath

div id="subjects" class=”content”
ul
li English /li
li Maths /li
li Science /li
/ul
/div

If your target element is li English /li then you can find element by
IWebElement firstSubject = driver.FindElement(By.CssSelector("#subjects li : first-child"))
or
IWebElement firstSubject = driver.FindElement(By.XPath("//*[@id='subjects']/ul/child::li[1]"))

6. Avoid absolute xpath

Ex: /html/body/div/div/div/div/div/div[2]/div/div/div/div/div[2]/div/span

7. Avoid using xpath and css finding tools like firepath and chropath to get xpath of css as they may not give you optimized xpath or css.

8. Always keep a cheat sheet in your work desk

Possible Interview Questions on Selenium locators best practices :
What are the best practices of selenium Webdriver locators?
What is the locators priority order?

Комментарии

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

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

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

video2dn Copyright © 2023 - 2025

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