This file contains hidden or 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 | |
| from selenium.webdriver.common.by import By | |
| import os | |
| mainhtml = """ | |
| <!DOCTYPE HTML> | |
| <html> | |
| <head> | |
| <title>window switching</title> | |
| </head> |
This file contains hidden or 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
| <html> | |
| <head> | |
| </head> | |
| <body> | |
| <input id=ty type=text> | |
| <div id=replication> | |
| </div> | |
| <script type="text/javascript" src="task1.js"></script> | |
| </body> | |
| </html> |
This file contains hidden or 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
| #!/usr/bin/python | |
| from optparse import OptionParser | |
| def main(urls): | |
| import urllib2 | |
| response = urllib2.urlopen(urls) | |
| try: | |
| print "Checking for HTTPS" | |
| assert "https://" in response.geturl(), "Have not been redirected to HTTPS" | |
| print "Redirected to HTTPS version of site" |
This file contains hidden or 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
| David-Burnss-MacBook-Pro:components davidburns$ svn diff driver-component.js | |
| Index: driver-component.js | |
| =================================================================== | |
| --- driver-component.js (revision 12372) | |
| +++ driver-component.js (working copy) | |
| @@ -126,8 +126,7 @@ | |
| return ServerModule; | |
| } | |
| -WebDriverServer.prototype.classID = CLASS_ID; |
This file contains hidden or 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
| David-Burnss-MacBook-Pro:selenium davidburns$ ./go clean test_remote_py | |
| (in /development/selenium) | |
| Using iPhoneSDK: 'iphonesimulator4.1' | |
| virtualenv --no-site-packages build/python | |
| New python executable in build/python/bin/python | |
| Installing setuptools............done. | |
| build/python/bin/pip install simplejson py pytest rdflib | |
| Downloading/unpacking simplejson | |
| Running setup.py egg_info for package simplejson | |
| Downloading/unpacking py |
This file contains hidden or 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 | |
| from selenium.webdriver.common.keys import Keys | |
| import unittest | |
| class TestHistory(unittest.TestCase): | |
| def setUp(self): | |
| self.driver = webdriver.Firefox() | |
| def tearDown(self): |
This file contains hidden or 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
| _______ FirefoxAdvancedUserInteractionTest.testCannotMoveToANullLocator ________ | |
| self = <selenium.test.selenium.webdriver.firefox.test_ff_interactions.FirefoxAdvancedUserInteractionTest testMethod=testCannotMoveToANullLocator> | |
| def testCannotMoveToANullLocator(self): | |
| """Copied from org.openqa.selenium.interactions.TestBasicMouseInterface.""" | |
| self._loadPage("javascriptPage") | |
| try: | |
| move = ActionChains(self.driver) \ |
This file contains hidden or 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
| (seltest)David-Burnss-MacBook-Pro:selenium2 davidburns$ pip install selenium | |
| Downloading/unpacking selenium | |
| Downloading selenium-2.5.0.tar.gz (2.4Mb): 2.4Mb downloaded | |
| Running setup.py egg_info for package selenium | |
| /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'src_root' | |
| warnings.warn(msg) | |
| Requirement already satisfied (use --upgrade to upgrade): rdflib==3.1.0 in /Users/davidburns/.virtualenvs/seltest/lib/python2.6/site-packages (from selenium) | |
| Installing collected packages: selenium | |
| Running setup.py install for selenium | |
| /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'src_root' |
This file contains hidden or 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
| dotnet/test/WebDriver.Common.Tests/WebDriver.Common.Tests.pidb | |
| ? dotnet/test/WebDriver.Remote.Tests/WebDriver.Remote.Tests.pidb | |
| ? dotnet/test/WebDriver.Support.Tests/WebDriver.Support.Tests.pidb | |
| ? dotnet/test/WebDriver.Chrome.Tests/WebDriver.Chrome.Tests.pidb | |
| ? dotnet/test/Selenium.WebDriverBackedSelenium.Tests/Selenium.WebDriverBackedSelenium.Tests.pidb | |
| ? dotnet/test/WebDriver.IE.Tests/WebDriver.IE.Tests.pidb | |
| ? dotnet/test/Selenium.Core.Tests/Selenium.Core.Tests.pidb | |
| ? dotnet/test/WebDriver.Android.Tests/WebDriver.Android.Tests.pidb | |
| ? dotnet/test/WebDriver.Firefox.Tests/WebDriver.Firefox.Tests.pidb | |
| ? dotnet/src/WebDriver.Support/WebDriver.Support.pidb |
This file contains hidden or 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 unittest | |
| from selenium import webdriver | |
| class TestGoogleLoads(unittest.TestCase): | |
| def testThatSomethingLoads(self): | |
| driver = webdriver.Firefox() | |
| driver.get("http://www.google.com") | |
| assert "Google" in driver.title | |
| driver.quit() |