DEV Community

Discussion on: Pytest vs Cypress: A fair fight in UI testing?

Collapse
 
thatamymac profile image
Amy MacKinnon

I'm curious, have you tried out elsnoman.gitbook.io/pylenium/ ? I'm really interested to know how it compares to SeleniumBase, but since Pylenium is so much newer there doesn't seem to be anyone talking about how it compares. I'm curious if the only different is that it's lighter weight than SeleniumBase at this point. They both seem to accomplish the same thing of making end to end tests more simple to write with Python and Selenium. What are your thoughts?

Collapse
 
mintzworld profile image
Michael Mintz

Hi Amy, In terms of lightness, both are light weight (under a MegaByte). SeleniumBase can do far more though: UI Testing, Visual Testing, Website walkthroughs, Charts, Presentations, etc. And the syntax when using the sb pytest fixture is very clean and flexible:

# "sb" pytest fixture test in a method with no class
def test_sb_fixture_with_no_class(sb):
    sb.open("https://google.com/ncr")
    sb.type('input[title="Search"]', 'SeleniumBase\n')
    sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]')
    sb.click('a[title="seleniumbase"]')


# "sb" pytest fixture test in a method inside a class
class Test_SB_Fixture():
    def test_sb_fixture_inside_class(self, sb):
        sb.open("https://google.com/ncr")
        sb.type('input[title="Search"]', 'SeleniumBase\n')
        sb.click('a[href*="github.com/seleniumbase/SeleniumBase"]')
        sb.click('a[title="examples"]')
Enter fullscreen mode Exit fullscreen mode

See seleniumbase.io/help_docs/features... for the list of features.