Marionette

最後更新: 2017-12-19

 

介紹

HomePage: https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette

 


# Getting the Client

pip.exe install marionette_driver

# Getting a Marionette-enabled Firefox

"C:\Program Files\Mozilla Firefox\firefox.exe" -marionette

 * Firefox 個 Address Bar Icon 會有個機械人

# Interactive

from marionette_driver.marionette import Marionette
# Assuming you’re using the default port
client = Marionette(host='localhost', port=2828)
client.start_session()

client.navigate("http://www.mozilla.org")
client.get_url()

from marionette_driver import By
first_link = client.find_element(By.TAG_NAME, "a")

first_link.click()

 


Doc

 

http://marionette-client.readthedocs.io/en/latest/reference.html

 

 

 

 

Creative Commons license icon Creative Commons license icon