Python Forum
Selenium Page Object Model with Python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selenium Page Object Model with Python
#4
try to replace imports in test_sign_in_page.py to:
from tests.base_test import BaseTest
from pages.main_page import MainPage
and then you probably will have to use local import because of circular imports -> remove
from pages.main_page import MainPage

from login_page.py and import it inside the age_gender_verification:
def age_gender_verification(self):
    from pages.main_page import MainPage
and if I were you I would try to avoid * imports
Reply


Messages In This Thread
Selenium Page Object Model with Python - by Cryptus - Aug-17-2020, 09:54 PM
RE: Selenium Page Object Model with Python - by mlieqo - Aug-18-2020, 04:31 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Click on a button on web page using Selenium Pavel_47 7 7,447 Jan-05-2023, 04:20 AM
Last Post: ellapurnellrt
  Selenium/Helium loads up a blank web page firaki12345 0 2,816 Mar-23-2021, 11:51 AM
Last Post: firaki12345
  Saving html page and reloading into selenium while developing all xpaths Larz60+ 4 6,018 Feb-04-2021, 07:01 AM
Last Post: jonathanwhite1
  Selenium Parsing (unable to Parse page after loading) oneclick 7 7,716 Oct-30-2020, 08:13 PM
Last Post: tomalex
  Code example for entering input in a textbox with requests/selenium object peterjv26 1 2,999 Sep-26-2020, 04:34 PM
Last Post: Larz60+
  Selenium on Angular page Martinelli 3 7,854 Jul-28-2020, 12:40 PM
Last Post: Martinelli
  use Xpath in Python :: libxml2 for a page-to-page skip-setting apollo 2 4,807 Mar-19-2020, 06:13 PM
Last Post: apollo
  Selenium get data from newly accessed page hoff1022 2 3,788 Oct-09-2019, 06:52 PM
Last Post: hoff1022
  Difficult web page -- Selenium Larz60+ 2 3,491 Dec-31-2018, 06:51 PM
Last Post: Larz60+
  Web Page not opening while web scraping through python selenium sumandas89 4 12,468 Nov-19-2018, 02:47 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020