You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: