Created
December 23, 2014 16:01
-
-
Save mralbu/09041e45482458e85c9c to your computer and use it in GitHub Desktop.
Phantomjs Splinter Gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import splinter | |
url = 'http://todomvc.com/examples/angularjs/#/' | |
b = splinter.Browser('phantomjs') | |
b.visit(url) | |
newtodo_input = b.find_by_id('new-todo').first | |
newtodo_input.fill('splinter rocks\n') | |
newtodo_input.fill('phantomjs rocks\n') | |
print [label.text for label in b.find_by_xpath('//label')] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment