Add the get_user_agent() method
This commit is contained in:
parent
67ac66b4f2
commit
6c58479cde
|
@ -43,6 +43,8 @@ self.get_page_source()
|
|||
self.get_title()
|
||||
# Duplicates: self.get_page_title()
|
||||
|
||||
self.get_user_agent()
|
||||
|
||||
self.go_back()
|
||||
|
||||
self.go_forward()
|
||||
|
|
|
@ -423,6 +423,10 @@ class BaseCase(unittest.TestCase):
|
|||
""" The shorter version of self.get_page_title() """
|
||||
return self.get_page_title()
|
||||
|
||||
def get_user_agent(self):
|
||||
user_agent = self.driver.execute_script("return navigator.userAgent;")
|
||||
return user_agent
|
||||
|
||||
def go_back(self):
|
||||
self.__last_page_load_url = None
|
||||
self.driver.back()
|
||||
|
|
Loading…
Reference in New Issue