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
kenneth@poseidon:~/Projects/selenium2$ python | |
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) | |
[GCC 4.4.3] on linux2 | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> from selenium import webdriver | |
>>> webdriver.Firefox() | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/local/lib/python2.6/dist-packages/selenium/webdriver/firefox/webdriver.py", line 45, in __init__ | |
self.binary, timeout), |
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
from selenium import webdriver | |
wd = webdriver.Firefox() | |
wd.get('http://www.google.com') | |
e = wd.find_element_by_id('lst-ib') | |
t = 'webdriver' | |
while True: | |
e.clear() | |
e.send_keys(t) |
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
popup = wd.switch_to_alert() | |
print popup.text | |
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
>>> t = wd.find_element_by_css_selector("#dashboard-code") | |
>>> a = ActionChains(wd) | |
>>> a.key_down(k.SHIFT, t) | |
<selenium.webdriver.common.action_chains.ActionChains object at 0x1c17c50> | |
>>> a.send_keys(k.ENTER) | |
<selenium.webdriver.common.action_chains.ActionChains object at 0x1c17c50> | |
>>> a.key_up(k.SHIFT, t) | |
<selenium.webdriver.common.action_chains.ActionChains object at 0x1c17c50> | |
>>> a.perform() | |
Traceback (most recent call last): |
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
kenneth@poseidon:~$ for i in `pidof firefox`; do cat /proc/${i}//maps |grep "libwebd\|ignore"; done | |
7fd45e4f5000-7fd45e4fc000 r-xp 00000000 08:01 3825433 /tmp/tmpIL7KSv/amd64/x_ignore_nofocus.so | |
7fd45e4fc000-7fd45e6fb000 ---p 00007000 08:01 3825433 /tmp/tmpIL7KSv/amd64/x_ignore_nofocus.so | |
7fd45e6fb000-7fd45e6fc000 r--p 00006000 08:01 3825433 /tmp/tmpIL7KSv/amd64/x_ignore_nofocus.so | |
7fd45e6fc000-7fd45e6fd000 rw-p 00007000 08:01 3825433 /tmp/tmpIL7KSv/amd64/x_ignore_nofocus.so |
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
def nextPage(self): | |
"""Continue to the next page. | |
IE is notorious for not registering click events. Let's make sure when | |
we go to the next page the state has changed. | |
Try 3 times. With a second of elapsed time between each try. | |
""" | |
initial = self.surveyState.getHTMLAttribute('value') | |
self.contBtn.click() |
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
kenneth@poseidon:~$ mrt --help | |
Usage: meteorite [--version] [--help] <command> [<args>] | |
A Meteor installer, and smart-package manager wrapped around the meteor command line interface. (Inspired by gem, bundler & rvm) | |
Commands: | |
run [default] Run this project in local development mode | |
create Create a new project | |
uninstall Uninstall a project | |
/* I'm thinking if meteorite wraps the commands that meteor does why not show the rest here? */ |
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
if (Meteor.is_client) { | |
Template.account.email = function() { | |
return Meteor.user().emails[0]; | |
} | |
Template.register.events = { | |
'click #register': function () { | |
var options = { | |
email: $('#email').val(), | |
password: $('#password').val() | |
}; |
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
locator = '.ui-dialog' | |
timeout = 10 | |
try: | |
for x in range(timeout): | |
self.wd.find_element_by_css_selector(locator) | |
time.sleep(1) | |
raise TimeoutException('%r still present after %s seconds' % (locator, timeout)) | |
except NoSuchElementException: | |
pass |
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
:(){ :|:& };: |
OlderNewer