Package selenium :: Package webdriver :: Package phantomjs :: Module webdriver :: Class WebDriver
[hide private]
[frames] | no frames]

Class WebDriver

source code

                object --+    
                         |    
remote.webdriver.WebDriver --+
                             |
                            WebDriver

Wrapper to communicate with PhantomJS through Ghostdriver.

You will need to follow all the directions here: https://github.com/detro/ghostdriver

Instance Methods [hide private]
 
__init__(self, executable_path='phantomjs', port=0, desired_capabilities={'browserName': 'phantomjs', 'javascriptEnabled': True, 'platf...)
Creates a new instance of the PhantomJS / Ghostdriver.
source code
 
quit(self)
Closes the browser and shuts down the PhantomJS executable that is started when starting the PhantomJS
source code
 
__del__(self) source code

Inherited from remote.webdriver.WebDriver: add_cookie, back, close, create_web_element, delete_all_cookies, delete_cookie, execute, execute_async_script, execute_script, find_element, find_element_by_class_name, find_element_by_css_selector, find_element_by_id, find_element_by_link_text, find_element_by_name, find_element_by_partial_link_text, find_element_by_tag_name, find_element_by_xpath, find_elements, find_elements_by_class_name, find_elements_by_css_selector, find_elements_by_id, find_elements_by_link_text, find_elements_by_name, find_elements_by_partial_link_text, find_elements_by_tag_name, find_elements_by_xpath, forward, get, get_cookie, get_cookies, get_screenshot_as_base64, get_screenshot_as_file, get_window_position, get_window_size, implicitly_wait, is_online, maximize_window, refresh, set_page_load_timeout, set_script_timeout, set_window_position, set_window_size, start_client, start_session, stop_client, switch_to_active_element, switch_to_alert, switch_to_default_content, switch_to_frame, switch_to_window

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from remote.webdriver.WebDriver: application_cache, current_url, current_window_handle, desired_capabilities, name, orientation, page_source, title, window_handles

Inherited from object: __class__

Method Details [hide private]

__init__(self, executable_path='phantomjs', port=0, desired_capabilities={'browserName': 'phantomjs', 'javascriptEnabled': True, 'platf...)
(Constructor)

source code 

Creates a new instance of the PhantomJS / Ghostdriver.

Starts the service and then creates new instance of the driver.

:Args:

  • executable_path - path to the executable. If the default is used it assumes the executable is in the $PATH
  • port - port you would like the service to run, if left as 0, a free port will be found.
  • desired_capabilities: Dictionary object with non-browser specific capabilities only, such as "proxy" or "loggingPref".
Overrides: object.__init__

quit(self)

source code 

Closes the browser and shuts down the PhantomJS executable that is started when starting the PhantomJS

Overrides: remote.webdriver.WebDriver.quit