Загрузка страницы

Python Selenium: Fundamentals to Frameworks (with SeleniumBase) - Michael Mintz, iboss

Python Selenium: Fundamentals to Frameworks (with SeleniumBase) - Michael Mintz, iboss

Do you love Python? The WebDriver Ecosystem has you covered! With millions of downloads from the Python Package Index, (and growing), the Selenium Python bindings are a popular option for automation engineers worldwide.

This deep-dive session will kick-off with a demonstration of Python Selenium fundamentals. From there, we'll transition into improving on the fundamentals by using a test framework, SeleniumBase, which builds on top of pytest and other popular Python unit-testing frameworks.

Why use a test framework with Selenium? Selenium was designed to be a browser automation library... not a test framework, which can add useful features and improve on existing functionality.

Disadvantages of using raw Selenium without additional libraries or frameworks:

The default timeout is 0: If an element isn't immediately ready to be interacted with, you'll get errors when trying to interact with those elements.
The command statements can get a bit too long for performing a basic action. Eg: `self.driver.find_element(By.CSS_SELECTOR, CSS_SELECTOR).click()` to click an element, which can be simplified.
No HTML reports, dashboards, results, automatic screenshots, etc.
No driver management: Eg. If chromedriver isn't on your system path when calling driver.Chrome(), you'll get errors. (This may change soon!)
No command-line options for changing default Selenium behavior or adding more functionality.
No advanced tools included, such as recorders, test-runners, etc.

A test framework can improve on that list!

Sometimes people choose to build their own frameworks: If that's you, you'll learn about how to do that more easily. Sometimes people choose to use an existing framework: If that's you, you'll learn about an existing one, (SeleniumBase), which may have all the features you're looking for.
Outline/Structure

Live demos and examples of Python automation scripts the whole way! Most examples can be found in the SeleniumBase examples folder: https://github.com/seleniumbase/SeleniumBase/tree/master/examples

Things that will get covered:

Python Selenium fundamentals.
Generic ways for test frameworks to improve on the fundamentals.
Using SeleniumBase as a framework to make Python Selenium testing easier.

There will be multiple examples from https://github.com/seleniumbase/SeleniumBase/tree/master/examples/migration/raw_selenium, which demonstrate various ways to improve on raw Selenium without additional libraries.
Learning Outcome

You'll jump from learning the basics to mastering advancing Python automation techniques in under an hour.
Target Audience
Python enthusiasts
Prerequisites for Attendees

Basic knowledge of Python
Links

https://confengine.com/conferences/selenium-conf-2022/proposal/16748/solving-wordle-with-python-and-selenium-and-then-running-that-in-github-actions

https://sessionize.com/michael-mintz/

https://dev.to/mintzworld/solving-the-wordle-game-using-python-and-selenium-1aei

https://seleniumbase.com/the-ultimate-pytest-debugging-guide-2021/

Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should) also be automated as well. For more infomation check out: https://www.selenium.dev/

Видео Python Selenium: Fundamentals to Frameworks (with SeleniumBase) - Michael Mintz, iboss канала Selenium Conference
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
1 апреля 2023 г. 9:37:09
00:46:51
Яндекс.Метрика