Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8257571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:14:31+00:00 2026-06-08T02:14:31+00:00

are there any 3rd party libs at all in python that do something on

  • 0

are there any 3rd party libs at all in python that do something on top of webdriver?

I am considering using selenium webdriver in python, but i would really like to use a ui-module based approach. What i mean by that is instead of code that might look like this:

cheese = driver.find_element_by_css_selector("#food span.dairy.aged")
cheese.click()

i want something like (not python!):

   ui.Div(uid: "div1", clocator: [id: "div1"]) {
      Div(uid: "inner-container", clocator: [id: "div2"]) {
        List(uid: "list1", clocator: [tag: "ul"], separator: "li"){
          UrlLink(uid: "{all}", clocator: [:])
        }
      } 
   }
   click 'inner-container'

So I define my UI beforehand, and then write the testcases. If the UI changes, I need to change the UI module definition and not worry about the testcases.

I can hand roll this, but are there any libs for python that do this for me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:14:33+00:00Added an answer on June 8, 2026 at 2:14 am

    There is no existing project that I am aware of that does what you want. One pattern that I’ve been using in my functional tests with Webdriver is to define each logical page as a class. Something like this:

    class LoginPage(object):
    
        def __init__(self, testcase):
            self.tc = testcase
    
        def login(self, username, password, at_login_page=False):
            if not at_login_page:
                self.tc.browser.get(self.tc.ROOT + '/login')
    
            self.tc.browser.find_element_by_id('id_username').send_keys(username)
            self.tc.browser.find_element_by_id('id_password').send_keys(password)
            login_button = self.tc.browser.find_element_by_id('login-button').click()
    

    And then use it in in the test like so, where ‘self’ in this case is an instance of unit test :

        login_page = site_pages.LoginPage(self)
        login_page.login(self.username, self.password)
    

    Using this pattern might get you close to what you want to do. The way a page works is logically contained in the class methods, instead of being endlessly repeated through each functional test.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any 3rd party tool which works like another layer on top of
Is there any built-in libraries (or any good 3rd party code) that support converting
Is there any way (3rd party product or other method) to do a partial
I was wondering if there are any 3rd party controls for use with the
Or is there any better suited 3rd party control for this purpose?
Is there any way to debug a 3rd party Java code (library) which, as
I've Goog'd but I can't find any third party library that will let you
Is there any 3rd party API which will provide text to speech facility??
Excluding any 3rd party extension not already bundled with PHP, Is there any method
Is there any free 3rd-party implementation of std::thread API for use in MSVC versions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.