SeleniumBase Test Automation Framework Tutorial

Ғылым және технология

Пікірлер: 64

  • @zahedkhan4972
    @zahedkhan49723 жыл бұрын

    Not a single dislike!! It proves how great your work is. Great job Michael

  • @gudraktv7461
    @gudraktv74614 жыл бұрын

    You're doing great with this framework Michael, good work man!

  • @dehai7226
    @dehai72264 жыл бұрын

    very good and powerful automation tool, thanks for sharing.

  • @FIIDII
    @FIIDII4 жыл бұрын

    Hi Michael Mintz, Fantastic work !

  • @etuannv
    @etuannv4 жыл бұрын

    Wow, it is great great selenium base. I

  • @djuzla89
    @djuzla893 жыл бұрын

    This video is pure gold!! Hvala :)

  • @ulisesibarguren125
    @ulisesibarguren1253 жыл бұрын

    You are THE MAN!!!

  • @eahabissac
    @eahabissac4 жыл бұрын

    Holly shit, that's fantastic!

  • @CR4WLFC
    @CR4WLFC4 жыл бұрын

    Is there a page object model setup example somewhere? If looked at your github but I was wondering if there are larger examples something that would work with big web applications.

  • @MichaelMintz

    @MichaelMintz

    4 жыл бұрын

    See github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates/samples for examples using the Page Object Model

  • @ulfgj
    @ulfgj Жыл бұрын

    amen!

  • @alexpinchuk8094
    @alexpinchuk80943 жыл бұрын

    It's so useful. Thank you so much

  • @gawrysiak100
    @gawrysiak100 Жыл бұрын

    thx

  • @badoiuecristian
    @badoiuecristian Жыл бұрын

    This is a great wrapper. I have worked with it and is really simple. One question that I have is: how do you recommend going about the Google "this is an unsafe app" issue?

  • @MichaelMintz

    @MichaelMintz

    Жыл бұрын

    Is that a pop-up that appears on specific sites? I'm not familiar with it.

  • @badoiuecristian

    @badoiuecristian

    Жыл бұрын

    @@MichaelMintz When you go to google log-in page (gmail, youtube etc) put in your username using automation and the next thing they tell you is that your browser is unsafe and you can't progress. There are a lot of patches out there but none of them are elegant... wondering if you have any opinion on this.

  • @MichaelMintz

    @MichaelMintz

    Жыл бұрын

    @@badoiuecristian "--uc" as a pytest command-line option with SeleniumBase.

  • @badoiuecristian

    @badoiuecristian

    Жыл бұрын

    @@MichaelMintz thank you very much, it works with SB class as in SB(uc=True).

  • @emmanuelalder9052
    @emmanuelalder905211 ай бұрын

    Hi @Micheal, I can't believe I'm only just hearing about SeleniumBase. I'm a manual tester with basic experience using Selenium webdriver. Is it worth making the switch? Also, I currently write BDD-style tests using Pytest-BDD, can I use Pytest-BDD within SeleniumBase? Thank you.

  • @MichaelMintz

    @MichaelMintz

    11 ай бұрын

    Hello, you may find that SeleniumBase makes testing easier if you make the switch. There’s a BDD format if you prefer: github.com/seleniumbase/SeleniumBase/tree/master/examples/behave_bdd (it uses “behave” BDD instead of pytest-BDD).

  • @emmanuelalder9052

    @emmanuelalder9052

    11 ай бұрын

    @@MichaelMintz thanks for replying. That's perfect. I'll check the link and see if I can make it work with pytest-bdd. I look forward to more of your videos/ content. Thank you.

  • @user-qe1ng1ut5p
    @user-qe1ng1ut5p4 жыл бұрын

    great work !!!!!! great automation i have question about automation in multi tabs in parallel is possible or not yet thank you

  • @MichaelMintz

    @MichaelMintz

    4 жыл бұрын

    Thank you. There's the SeleniumBase open_new_window() method, which opens a new tab/window.

  • @user-qe1ng1ut5p

    @user-qe1ng1ut5p

    4 жыл бұрын

    @@MichaelMintz I tried this method but the problem is that the driver cannot handle all tabs or more than one tab in parallel

  • @MichaelMintz

    @MichaelMintz

    4 жыл бұрын

    @@user-qe1ng1ut5p Tests can be run in parallel by specifying that on the command line. Example: Add "-n 4" to run 4 tests at the same time using pytest multi-threading.

  • @user-qe1ng1ut5p

    @user-qe1ng1ut5p

    4 жыл бұрын

    i tried also multi threading with instance for each thread and same problem

  • @MichaelMintz

    @MichaelMintz

    4 жыл бұрын

    @@user-qe1ng1ut5p Head over to gitter.im/seleniumbase/SeleniumBase and share the code you used along with the stack trace. (Or open a ticket on the GitHub page.) We can debug your issue, as it sounds specific to your code.

  • @ho0k17
    @ho0k17 Жыл бұрын

    How we can implement method chaining and page chaining in seleniumbase?

  • @MichaelMintz

    @MichaelMintz

    Жыл бұрын

    The methods that need it already have it included. For details, see github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md

  • @dragon3602010
    @dragon36020103 жыл бұрын

    freaking awesome 😍 what do you think about Playwright ? thanks

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    I hear it's quite popular now. The syntax of the pytest version of Playwright is very similar to SeleniumBase's "sb" fixture format.

  • @user-ou9ts4xq8m
    @user-ou9ts4xq8m2 жыл бұрын

    argparse.ArgumentError: argument --port: conflicting option string: --port

  • @MichaelMintz

    @MichaelMintz

    2 жыл бұрын

    It looks like you have another pytest plugin installed that also sets the "port" argument. To fix that, either install SeleniumBase into a new virtual environment, or uninstall the other pytest plugin that's trying to set the port. If you type "pytest -h" on the command line, you'll be able to see what other plugin is setting the port.

  • @user-ou9ts4xq8m

    @user-ou9ts4xq8m

    2 жыл бұрын

    @@MichaelMintz Yes you are right. I was wrong

  • @satvirsinghkambo
    @satvirsinghkambo Жыл бұрын

    Is there a way to stop browser from closing in the end after test and quit the browser with quit method when needed …

  • @MichaelMintz

    @MichaelMintz

    Жыл бұрын

    `pytest --final-debug` (Opens a Pdb+ breakpoint at the end of the test before closing the browser. `c` to continue from there.)

  • @notmimul
    @notmimul Жыл бұрын

    My test was adding data into the form and the data already existed so half way through the code the test there was a notification that the data already exist but the test was keep running and it passed. How do I overcome that?

  • @MichaelMintz

    @MichaelMintz

    Жыл бұрын

    Sounds like you need to add a Python "if" statement into your code to not add text into a field if there's already text present. There's a method, "is_text_visible()", that may help you here.

  • @FranklinGames
    @FranklinGames Жыл бұрын

    Good afternoon Can I monitor traffic in tests (Inspect network activity)?

  • @MichaelMintz

    @MichaelMintz

    Жыл бұрын

    Yes, there are a few ways. There's the Chrome Devtools Protocol way, eg github.com/seleniumbase/SeleniumBase/blob/master/examples/uc_cdp_events.py And there's the selenium-wire integration (pytest --wire): github.com/seleniumbase/SeleniumBase/issues/1574

  • @djaudacity5543
    @djaudacity55432 жыл бұрын

    Is it possible to run multiple tests without having it to close and open a webdriver after/before every test. Like 1 continuous flow.

  • @MichaelMintz

    @MichaelMintz

    2 жыл бұрын

    Yes, use "--reuse-session" with pytest to reuse the browser session for all tests. More info on command-line options here: seleniumbase.io/help_docs/customizing_test_runs/

  • @rotrose7531
    @rotrose75313 жыл бұрын

    Thank you for creating this amazing framework, thanks to it I build a test units that save out team hours of manual testing. If possible, I would like to ask you two questions: 1. Besides scroll down the window, is there any way to scroll down a modal which does has a scroll bar 2. I am considering to integrate all these to jenkins, but because our network is not a open one, Instead of pip install that must be done via internet, is there anyway I can download the source and install it without Internet. And I want to use it on Centos Platform, if any document exists around, it will helps a lot.

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    Hi, you can use the arrow keys to move sliders and scroll. For example: ``self.press_right_arrow("#myslider", times=5)``, which is from the github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py example. For your second question, you can clone the repo and install from that. (Details in the main README). On Centos, it's easy to get Python/pip installed with: "yum -y update" and then "yum -y install python-pip". Once Python/pip is installed, it's easy to install the rest of SeleniumBase. There are StackOverflow articles on getting the web browsers installed there if they aren't already installed.

  • @rotrose7531

    @rotrose7531

    3 жыл бұрын

    @@MichaelMintz Thank you SO MUCH for the kind answer, I love seleniumBase very much, and I am expecting to see more miracle from you. Thank you.

  • @muhammadhakimsaputra1160
    @muhammadhakimsaputra11603 жыл бұрын

    How to bypass login step in seleniumbase? because many of the test scenarios start with that step and It takes time 🙏

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    Depending on the website, you may be able to proceed with authentication by opening the URL with the auth included: "user:pass@example.com". For running tests against a proxy server with authentication, add this to your pytest run command: --proxy="user:pass@host:port".

  • @muhammadhakimsaputra1160

    @muhammadhakimsaputra1160

    3 жыл бұрын

    @@MichaelMintz how to run script in certain time with selenium base? Example : i will run the script at 15.30 pm

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    @@muhammadhakimsaputra1160 For that, you'll need to set up a cron job: en.wikipedia.org/wiki/Cron Many continuous integration platforms (like Jenkins) use cron format for having tests run at specific times.

  • @djaudacity5543
    @djaudacity55432 жыл бұрын

    Is it possible to save the report in a custom folder?

  • @MichaelMintz

    @MichaelMintz

    2 жыл бұрын

    --html=FOLDER/report.html

  • @shivabhardwaj3760
    @shivabhardwaj37602 жыл бұрын

    Hello, Can we use xpath to locate elements? I see in most of your methods that you have used CSS selectors to locate elements

  • @MichaelMintz

    @MichaelMintz

    2 жыл бұрын

    Hello Shiva, Yes, you can use xpath selectors in place of CSS selectors. SeleniumBase will automatically detect which one is being used.

  • @shivabhardwaj3760

    @shivabhardwaj3760

    2 жыл бұрын

    Thanks for the reply! Can I use this xpath: //div[@id="sidebar-order-details"]/div/div[1]/div[2]/div ?

  • @MichaelMintz

    @MichaelMintz

    2 жыл бұрын

    @@shivabhardwaj3760 Yes, you can use any valid xpath selector.

  • @sunilpatro1985
    @sunilpatro19853 жыл бұрын

    Can you please explain where exactly the pytest command line parameters store in code? I understood the pytest_plugin.py to read the parameters but not sure where the parameters are storing and how we are using in diff files?

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    Hello, those pytest command line parameters are stored in sb_config, and then used in other files such as [base_case.py] and [browser_launcher.py].

  • @sunilpatro1985

    @sunilpatro1985

    3 жыл бұрын

    I am finding hard to understand the sb_config, is it a file or object? I don't see that in any package

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    @@sunilpatro1985 Look for the: "from seleniumbase import config as sb_config", which is located in several files. It's an object for storing parameters.

  • @yaroslavbondarenko8724
    @yaroslavbondarenko87243 жыл бұрын

    There is no support of Appium:(

  • @MichaelMintz

    @MichaelMintz

    3 жыл бұрын

    Try the mobile-device emulator: github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md

  • @yaroslavbondarenko8724

    @yaroslavbondarenko8724

    3 жыл бұрын

    @@MichaelMintz thank you for answer, but i need to check everything on real devices + application, ill copy the Best concepts, if ill have time ill create a pull request for adding appium

Келесі