Created
September 20, 2015 22:26
-
-
Save dudepare/066a892ce032d6a844f6 to your computer and use it in GitHub Desktop.
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 unittest | |
from selenium import webdriver | |
class CountFilled(unittest.TestCase): | |
def setUp(self): | |
self.driver = webdriver.PhantomJS() | |
def test_count_filled(self): | |
self.driver.get("http://apply.dataprocessors.com.au/") | |
self.driver.find_element_by_xpath("//form/p[1]/input").send_keys("PO65") | |
self.driver.find_element_by_xpath("//form/p[3]/input").send_keys("{}".format(self.driver.page_source.count('"fi'))) | |
self.driver.find_element_by_xpath("//form/p[4]/input").click() | |
def tearDown(self): | |
print(self.driver.page_source) | |
self.driver.close() | |
if __name__ == "__main__": | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment