Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi Artur, Please help me understand in Base class where are we opening the Browser and what contents do we have to pass to Settings.py to invoke the https://www.test-junkie.com/ #36

Open
alumba opened this issue Aug 25, 2020 · 0 comments

Comments

@alumba
Copy link

alumba commented Aug 25, 2020

Describe desired feature

Any existing examples of such feature? - Hi Artur, Please help me understand in Base class where are we opening the Browser and what contents do we have to pass to Settings.py to invoke the https://www.test-junkie.com/, But it doenot opens browser and Runs the Texts.

Thanks,
Ashish

Baseclass.py
class BasePage:
def init(self, domain, directory, title):
"""
This class will be inherited by all of the Page Objects
:param domain: STRING, Base domain of the website aka "https://test-junkie.com"
Base domain & expected URL will be used to open this page
:param directory: STRING, expected URL of the page that is inheriting this class aka:
"/documentation/" or "/get-started/"
:param title: STRING, expected Title of the page that is inheriting this class
"""
self.__title = title
self.__directory = directory
self.__domain = domain
self.__expected_url = "{domain}{directory}".format(domain=domain, directory=directory)
@Property
def expected_directory(self):
return self.__directory
@Property
def expected_domain(self):
return self.__domain
@Property
def expected_title(self):
return self.__title
@Property
def expected_url(self):
return self.__expected_url
@staticmethod
def get_actual_title():
return Browser.get_driver().title
@staticmethod
def get_actual_url():
return Browser.get_driver().current_url
def open(self, **kwargs):
"""
This method will open the page which inherited BasePage
:return: self (Page Object which inherited BasePage will be returned)
"""
Browser.get_driver().get(self.expected_url)
return self

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant