2013-06-03 16:31:39 +00:00
|
|
|
"""
|
|
|
|
external library imports
|
|
|
|
"""
|
|
|
|
import logging
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import time
|
|
|
|
import unittest
|
2015-08-25 23:20:14 +00:00
|
|
|
from urlparse import (urlparse, urlunparse)
|
2011-12-21 17:31:58 +00:00
|
|
|
|
2013-06-03 16:31:39 +00:00
|
|
|
from selenium import selenium, webdriver
|
|
|
|
from selenium.common.exceptions import NoSuchElementException
|
|
|
|
from selenium.webdriver.support.ui import WebDriverWait
|
2016-06-15 18:16:33 +00:00
|
|
|
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
|
2012-10-15 01:19:05 +00:00
|
|
|
|
2013-06-03 16:31:39 +00:00
|
|
|
"""
|
|
|
|
django imports
|
|
|
|
"""
|
2012-05-18 22:06:35 +00:00
|
|
|
import django
|
2012-03-14 22:06:29 +00:00
|
|
|
from django.conf import settings
|
|
|
|
|
2013-06-03 16:31:39 +00:00
|
|
|
"""
|
|
|
|
regluit imports
|
|
|
|
"""
|
|
|
|
from regluit.core import models
|
|
|
|
from regluit.payment import stripelib
|
|
|
|
from regluit.payment.manager import PaymentManager
|
|
|
|
from regluit.payment.models import Transaction, PaymentResponse, Receiver
|
2012-03-13 17:37:19 +00:00
|
|
|
|
2012-03-13 18:01:49 +00:00
|
|
|
def setup_selenium():
|
|
|
|
# Set the display window for our xvfb
|
|
|
|
os.environ['DISPLAY'] = ':99'
|
|
|
|
|
2012-03-13 17:37:19 +00:00
|
|
|
def set_test_logging():
|
|
|
|
|
|
|
|
# Setup debug logging to our console so we can watch
|
|
|
|
defaultLogger = logging.getLogger('')
|
|
|
|
defaultLogger.addHandler(logging.StreamHandler())
|
|
|
|
defaultLogger.setLevel(logging.DEBUG)
|
|
|
|
|
|
|
|
# Set the selenium logger to info
|
|
|
|
sel = logging.getLogger("selenium")
|
|
|
|
sel.setLevel(logging.INFO)
|
|
|
|
|
|
|
|
|
2016-06-15 18:16:33 +00:00
|
|
|
def selenium_driver(browser='firefox'):
|
|
|
|
|
|
|
|
if browser == 'firefox':
|
|
|
|
firefox_capabilities = DesiredCapabilities.FIREFOX
|
|
|
|
firefox_capabilities['marionette'] = True
|
|
|
|
firefox_capabilities['binary'] = settings.FIREFOX_PATH
|
|
|
|
driver = webdriver.Firefox(capabilities=firefox_capabilities)
|
|
|
|
elif browser == 'htmlunit':
|
|
|
|
# HTMLUNIT with JS -- not successful
|
|
|
|
driver = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.HTMLUNITWITHJS)
|
|
|
|
else:
|
|
|
|
driver = webdriver.Chrome(executable_path=settings.CHROMEDRIVER_PATH)
|
|
|
|
|
|
|
|
return driver
|
|
|
|
|
2012-03-14 22:06:29 +00:00
|
|
|
|
|
|
|
class GoogleWebDriverTest(unittest.TestCase):
|
|
|
|
|
|
|
|
def setUp(self):
|
|
|
|
setup_selenium()
|
|
|
|
self.verificationErrors = []
|
|
|
|
# This is an empty array where we will store any verification errors
|
|
|
|
# we find in our tests
|
|
|
|
|
2016-06-15 18:16:33 +00:00
|
|
|
self.selenium = selenium_driver(browser='firefox')
|
2012-03-14 22:06:29 +00:00
|
|
|
set_test_logging()
|
|
|
|
|
|
|
|
def test_google_rc(self):
|
|
|
|
sel = self.selenium
|
|
|
|
sel.get("https://www.google.com/")
|
|
|
|
search_box = sel.find_elements_by_xpath("//input[@type='text']")
|
|
|
|
search_box[0].send_keys("Bach")
|
|
|
|
search_box[0].submit()
|
|
|
|
time.sleep(3)
|
|
|
|
try:
|
|
|
|
sel.find_element_by_xpath("//a[contains(@href,'wikipedia')]")
|
|
|
|
except NoSuchElementException, e:
|
|
|
|
self.verificationErrors.append(str(e))
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
self.selenium.quit()
|
|
|
|
self.assertEqual([], self.verificationErrors)
|
|
|
|
|
2012-01-04 15:52:19 +00:00
|
|
|
def run_google_rc():
|
2012-03-13 18:01:49 +00:00
|
|
|
"""
|
|
|
|
"""
|
2012-01-04 15:52:19 +00:00
|
|
|
|
|
|
|
from selenium import selenium
|
|
|
|
import unittest, time, re
|
|
|
|
|
|
|
|
class google_rc(unittest.TestCase):
|
|
|
|
def setUp(self):
|
|
|
|
self.verificationErrors = []
|
|
|
|
self.selenium = selenium("localhost", 4444, "*firefox", "https://www.google.com/")
|
|
|
|
self.selenium.start()
|
|
|
|
|
|
|
|
def test_google_rc(self):
|
|
|
|
sel = self.selenium
|
|
|
|
sel.open("/")
|
2012-02-23 22:49:27 +00:00
|
|
|
sel.type("//input[@type='text']", "Bach")
|
2012-01-04 15:52:19 +00:00
|
|
|
sel.click("name=btnG")
|
|
|
|
time.sleep(3)
|
|
|
|
try: self.failUnless(sel.is_text_present("Wikipedia"))
|
|
|
|
except AssertionError, e: self.verificationErrors.append(str(e))
|
|
|
|
|
|
|
|
def tearDown(self):
|
|
|
|
self.selenium.stop()
|
|
|
|
self.assertEqual([], self.verificationErrors)
|
|
|
|
|
|
|
|
testcases = [google_rc]
|
|
|
|
suites = unittest.TestSuite([unittest.TestLoader().loadTestsFromTestCase(testcase) for testcase in testcases])
|
|
|
|
unittest.TextTestRunner().run(suites)
|
2012-03-13 17:37:19 +00:00
|
|
|
|
|
|
|
def run_google_wd():
|
|
|
|
"""
|
|
|
|
A google example using WebDriver
|
|
|
|
"""
|
|
|
|
|
|
|
|
testcases = [GoogleWebDriverTest]
|
|
|
|
suites = unittest.TestSuite([unittest.TestLoader().loadTestsFromTestCase(testcase) for testcase in testcases])
|
|
|
|
unittest.TextTestRunner().run(suites)
|
|
|
|
|
|
|
|
|
2012-01-04 15:52:19 +00:00
|
|
|
# from selenium import webdriver
|
|
|
|
# driver = webdriver.Remote(desired_capabilities=webdriver.DesiredCapabilities.HTMLUNITWITHJS)
|
|
|
|
# driver.get("http://google.com")
|
|
|
|
|
2012-03-14 22:06:29 +00:00
|
|
|
|
|
|
|
|
2011-12-21 17:31:58 +00:00
|
|
|
pm = PaymentManager()
|
|
|
|
|
|
|
|
def campaign_display():
|
|
|
|
|
2012-03-23 18:28:09 +00:00
|
|
|
campaigns_with_active_transactions = models.Campaign.objects.filter(transaction__status=IPN_PREAPPROVAL_STATUS_ACTIVE)
|
2011-12-21 17:31:58 +00:00
|
|
|
campaigns_with_incomplete_transactions = models.Campaign.objects.filter(transaction__status=IPN_PAY_STATUS_INCOMPLETE)
|
|
|
|
campaigns_with_completed_transactions = models.Campaign.objects.filter(transaction__status=IPN_PAY_STATUS_COMPLETED)
|
|
|
|
|
|
|
|
print "campaigns with active transactions", campaigns_with_active_transactions
|
|
|
|
print "campaigns with incomplete transactions", campaigns_with_incomplete_transactions
|
|
|
|
print "campaigns with completed transactions", campaigns_with_completed_transactions
|
|
|
|
|
|
|
|
def campaigns_active():
|
2012-03-23 18:28:09 +00:00
|
|
|
return models.Campaign.objects.filter(transaction__status=IPN_PREAPPROVAL_STATUS_ACTIVE)
|
2011-12-21 17:31:58 +00:00
|
|
|
|
|
|
|
def campaigns_incomplete():
|
|
|
|
return models.Campaign.objects.filter(transaction__status=IPN_PAY_STATUS_INCOMPLETE)
|
|
|
|
|
|
|
|
def campaigns_completed():
|
|
|
|
return models.Campaign.objects.filter(transaction__status=IPN_PAY_STATUS_COMPLETED)
|
|
|
|
|
|
|
|
def execute_campaigns(clist):
|
|
|
|
return [pm.execute_campaign(c) for c in clist]
|
|
|
|
|
|
|
|
def finish_campaigns(clist):
|
|
|
|
return [pm.finish_campaign(c) for c in clist]
|
|
|
|
|
2011-12-21 19:25:21 +00:00
|
|
|
def drop_all_transactions():
|
2012-01-03 18:37:20 +00:00
|
|
|
PaymentResponse.objects.all().delete()
|
|
|
|
Receiver.objects.all().delete()
|
2011-12-21 19:25:21 +00:00
|
|
|
Transaction.objects.all().delete()
|
2012-01-03 18:37:20 +00:00
|
|
|
|
2011-12-21 22:52:04 +00:00
|
|
|
# go through all Campaigns and set the self.left = self.target
|
|
|
|
for c in models.Campaign.objects.all():
|
|
|
|
c.left = c.target
|
|
|
|
c.save()
|
2011-12-21 19:25:21 +00:00
|
|
|
|
2011-12-21 23:11:46 +00:00
|
|
|
def recipient_status(clist):
|
2011-12-21 23:33:36 +00:00
|
|
|
return [[[(r.email, r.txn_id, r.status, r.amount) for r in t.receiver_set.all()] for t in c.transaction_set.all()] for c in clist]
|
2011-12-21 17:31:58 +00:00
|
|
|
|
|
|
|
# by the time we've executed a campaign, we should have r.status = 'COMPLETED' for primary but None for secondary
|
|
|
|
# [[[r.status for r in t.receiver_set.all()] for t in c.transaction_set.all()] for c in campaigns_incomplete()]
|
|
|
|
|
|
|
|
# [[[r.status for r in t.receiver_set.all()] for t in c.transaction_set.all()] for c in campaigns_completed()]
|
|
|
|
|
|
|
|
# res = [pm.finish_campaign(c) for c in campaigns_incomplete()]
|
|
|
|
|
2013-09-06 23:09:23 +00:00
|
|
|
def test_relaunch(unglue_it_url = settings.LIVE_SERVER_TEST_URL, do_local=True, backend='amazon', browser='firefox'):
|
2012-09-19 21:30:47 +00:00
|
|
|
django.db.transaction.enter_transaction_management()
|
|
|
|
|
|
|
|
UNGLUE_IT_URL = unglue_it_url
|
|
|
|
USER = settings.UNGLUEIT_TEST_USER
|
|
|
|
PASSWORD = settings.UNGLUEIT_TEST_PASSWORD
|
|
|
|
|
|
|
|
setup_selenium()
|
|
|
|
|
2016-06-15 18:16:33 +00:00
|
|
|
sel = selenium_driver(browser=browser)
|
2012-09-19 21:30:47 +00:00
|
|
|
|
|
|
|
time.sleep(5)
|
|
|
|
|
|
|
|
print "now opening unglue.it"
|
|
|
|
|
|
|
|
#sel.get("http://www.google.com")
|
|
|
|
sel.get(UNGLUE_IT_URL)
|
|
|
|
|
|
|
|
# long wait because sel is slow after PayPal
|
|
|
|
sign_in_link = WebDriverWait(sel, 100).until(lambda d : d.find_element_by_xpath("//span[contains(text(),'Sign In')]/.."))
|
|
|
|
sign_in_link.click()
|
|
|
|
|
|
|
|
# enter unglue.it login info
|
|
|
|
input_username = WebDriverWait(sel,20).until(lambda d : d.find_element_by_css_selector("input#id_username"))
|
|
|
|
input_username.send_keys(USER)
|
|
|
|
sel.find_element_by_css_selector("input#id_password").send_keys(PASSWORD)
|
2015-04-10 23:05:12 +00:00
|
|
|
sel.find_element_by_css_selector("input[value*='Sign in with Password']").click()
|
2012-09-19 21:30:47 +00:00
|
|
|
|
|
|
|
# click on biggest campaign list
|
|
|
|
# I have no idea why selenium thinks a is not displayed....so that's why I'm going up one element.
|
|
|
|
# http://stackoverflow.com/a/6141678/7782
|
2015-08-25 23:20:14 +00:00
|
|
|
#biggest_campaign_link = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("li > a[href*='/campaigns/ending']"))
|
|
|
|
#biggest_campaign_link.click()
|
|
|
|
#time.sleep(1)
|
|
|
|
|
|
|
|
# jump to /campaigns/ending#2
|
|
|
|
p = list(urlparse(UNGLUE_IT_URL)); p[2] = '/campaigns/ending#2'
|
|
|
|
sel.get(urlunparse(p))
|
2012-09-19 21:30:47 +00:00
|
|
|
time.sleep(1)
|
|
|
|
|
|
|
|
# pull up one of the campaigns to pledge to
|
|
|
|
# for now, take the first book and click on the link to get to the work page
|
2016-01-29 04:24:53 +00:00
|
|
|
|
2012-09-19 21:30:47 +00:00
|
|
|
work_links = WebDriverWait(sel,10).until(lambda d: d.find_elements_by_css_selector("div.book-list div.title a"))
|
2016-01-29 04:24:53 +00:00
|
|
|
time.sleep(2)
|
2012-09-19 21:30:47 +00:00
|
|
|
work_links[0].click()
|
2016-01-29 04:24:53 +00:00
|
|
|
time.sleep(2)
|
2012-09-19 21:30:47 +00:00
|
|
|
|
2012-11-27 20:00:55 +00:00
|
|
|
support_button = WebDriverWait(sel,10).until(lambda d: d.find_element_by_css_selector("input[value*='Pledge']"))
|
2012-09-19 21:30:47 +00:00
|
|
|
support_button.click()
|
|
|
|
|
|
|
|
# just click Pledge button without filling out amount -- should have the form validation spot the error
|
|
|
|
pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Pledge']"))
|
|
|
|
pledge_button.click()
|
|
|
|
# check to see whether there is an error
|
|
|
|
error_messages = WebDriverWait(sel,20).until(lambda d: d.find_elements_by_css_selector("ul.errorlist"))
|
|
|
|
if len(error_messages):
|
|
|
|
print "yes: Error in just hitting pledge button as expected"
|
|
|
|
else:
|
|
|
|
print "ooops: there should be an error message when pledge button hit"
|
|
|
|
|
|
|
|
print "making $10 pledge"
|
|
|
|
|
|
|
|
# now we have to replace the current preapproval amount with 10
|
|
|
|
sel.execute_script("""document.getElementById("id_preapproval_amount").value="10";""")
|
|
|
|
|
|
|
|
support_button = WebDriverWait(sel,10).until(lambda d: d.find_element_by_css_selector("input[value*='Pledge Now']"))
|
|
|
|
support_button.click()
|
|
|
|
|
2012-10-15 01:19:05 +00:00
|
|
|
## now fill out the credit card
|
|
|
|
## CVC should fail but doesn't for now -- hmmm.
|
|
|
|
#
|
|
|
|
#sel.execute_script("""document.getElementById("card_Number").value={0};""".format(stripelib.ERROR_TESTING['CVC_CHECK_FAIL'][0]))
|
|
|
|
#sel.execute_script("""document.getElementById("card_ExpiryMonth").value="01";""")
|
|
|
|
#sel.execute_script("""document.getElementById("card_ExpiryYear").value="14";""")
|
|
|
|
#sel.execute_script("""document.getElementById("card_CVC").value="123";""")
|
|
|
|
#
|
|
|
|
#verify_cc_button = WebDriverWait(sel,10).until(lambda d: d.find_element_by_css_selector("input[value*='Complete Pledge']"))
|
|
|
|
#verify_cc_button.click()
|
|
|
|
#
|
|
|
|
#yield sel
|
|
|
|
|
|
|
|
# let's put in a Luhn-invalid # e.g., 4242424242424241
|
|
|
|
sel.execute_script("""document.getElementById("card_Number").value="4242424242424241";""")
|
2012-09-26 22:03:46 +00:00
|
|
|
sel.execute_script("""document.getElementById("card_ExpiryMonth").value="01";""")
|
2014-02-01 15:20:07 +00:00
|
|
|
sel.execute_script("""document.getElementById("card_ExpiryYear").value="18";""")
|
2012-10-15 01:19:05 +00:00
|
|
|
sel.execute_script("""document.getElementById("card_CVC").value="321";""")
|
|
|
|
|
|
|
|
verify_cc_button = WebDriverWait(sel,10).until(lambda d: d.find_element_by_css_selector("input[value*='Complete Pledge']"))
|
|
|
|
verify_cc_button.click()
|
|
|
|
|
|
|
|
# should do a check for "Your card number is incorrect" -- but this doesn't stall -- so we're ok
|
|
|
|
time.sleep(2)
|
|
|
|
|
|
|
|
# should succeed
|
|
|
|
sel.execute_script("""document.getElementById("card_Number").value={0};""".format(stripelib.TEST_CARDS[0][0]))
|
|
|
|
sel.execute_script("""document.getElementById("card_ExpiryMonth").value="01";""")
|
2014-02-01 15:20:07 +00:00
|
|
|
sel.execute_script("""document.getElementById("card_ExpiryYear").value="18";""")
|
2012-10-15 01:19:05 +00:00
|
|
|
sel.execute_script("""document.getElementById("card_CVC").value="321";""")
|
|
|
|
|
|
|
|
time.sleep(2)
|
2012-09-19 21:30:47 +00:00
|
|
|
|
2012-10-11 02:54:56 +00:00
|
|
|
verify_cc_button = WebDriverWait(sel,10).until(lambda d: d.find_element_by_css_selector("input[value*='Complete Pledge']"))
|
2012-09-19 21:30:47 +00:00
|
|
|
verify_cc_button.click()
|
|
|
|
|
2012-09-26 01:30:36 +00:00
|
|
|
# verify that we are at pledge_complete
|
|
|
|
# sleep a bit to give enough time for redirecto pledge_complete to finish
|
|
|
|
|
|
|
|
time.sleep(3)
|
|
|
|
|
|
|
|
# should be back on a pledge complete page
|
|
|
|
print sel.current_url, re.search(r"/pledge/complete",sel.current_url)
|
|
|
|
|
2012-10-11 02:54:56 +00:00
|
|
|
# need to pick out the actual work pledged.
|
|
|
|
work_url = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector('p.pledge_complete a[href*="/work/"]'))
|
2012-09-26 01:30:36 +00:00
|
|
|
work_url.click()
|
|
|
|
|
|
|
|
# change_pledge
|
|
|
|
print "clicking Modify Pledge button"
|
|
|
|
change_pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Modify Pledge']"))
|
|
|
|
change_pledge_button.click()
|
|
|
|
|
2012-10-11 02:54:56 +00:00
|
|
|
# enter a new pledge, which is less than the previous amount
|
2012-09-27 16:32:29 +00:00
|
|
|
print "changing pledge to $5 -- should not need to go to Stripe"
|
2012-09-26 01:30:36 +00:00
|
|
|
sel.execute_script("""document.getElementById("id_preapproval_amount").value="5";""")
|
|
|
|
|
|
|
|
pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Modify Pledge']"))
|
|
|
|
pledge_button.click()
|
|
|
|
|
2012-09-27 16:32:29 +00:00
|
|
|
# return to the Work page again
|
2012-10-11 02:54:56 +00:00
|
|
|
work_url = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector('p.pledge_complete a[href*="/work/"]'))
|
2012-09-27 16:32:29 +00:00
|
|
|
work_url.click()
|
|
|
|
change_pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Modify Pledge']"))
|
|
|
|
change_pledge_button.click()
|
|
|
|
|
|
|
|
# modify pledge to $25
|
|
|
|
sel.execute_script("""document.getElementById("id_preapproval_amount").value="25";""")
|
|
|
|
|
|
|
|
pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Modify Pledge']"))
|
|
|
|
pledge_button.click()
|
|
|
|
|
|
|
|
# now cancel transaction
|
|
|
|
# now go back to the work page, hit modify pledge, and then the cancel link
|
2012-10-11 02:54:56 +00:00
|
|
|
|
|
|
|
work_url = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector('p.pledge_complete a[href*="/work/"]'))
|
2012-09-27 16:32:29 +00:00
|
|
|
work_url.click()
|
|
|
|
change_pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Modify Pledge']"))
|
|
|
|
change_pledge_button.click()
|
|
|
|
cancel_url = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector('a[href*="/pledge/cancel"]'))
|
|
|
|
cancel_url.click()
|
|
|
|
|
|
|
|
# hit the confirm cancellation button
|
|
|
|
cancel_pledge_button = WebDriverWait(sel,20).until(lambda d: d.find_element_by_css_selector("input[value*='Confirm Pledge Cancellation']"))
|
|
|
|
cancel_pledge_button.click()
|
2012-09-26 01:30:36 +00:00
|
|
|
|
2012-09-19 23:45:40 +00:00
|
|
|
time.sleep(10)
|
|
|
|
django.db.transaction.commit()
|
2012-09-26 01:30:36 +00:00
|
|
|
|
|
|
|
yield sel
|
2012-09-19 23:45:40 +00:00
|
|
|
|
|
|
|
# now use the transaction manager to make the charge
|
|
|
|
w = models.Work.objects.get(id=48)
|
|
|
|
c = w.campaigns.all()[0]
|
|
|
|
pm = PaymentManager()
|
|
|
|
result = pm.execute_campaign(c)
|
|
|
|
|
|
|
|
# should have a Complete transaction
|
|
|
|
print result
|
|
|
|
|
2012-09-19 21:30:47 +00:00
|
|
|
yield sel
|
|
|
|
|
2012-03-22 21:51:43 +00:00
|
|
|
|
|
|
|
|
2012-03-14 22:06:29 +00:00
|
|
|
|
2012-04-03 14:08:05 +00:00
|
|
|
def successful_campaign_signal():
|
|
|
|
"""fire off a success_campaign signal and send notifications"""
|
|
|
|
import regluit
|
|
|
|
c = regluit.core.models.Campaign.objects.get(id=3)
|
|
|
|
regluit.core.signals.successful_campaign.send(sender=None, campaign=c)
|
|
|
|
|
2012-03-20 18:21:06 +00:00
|
|
|
|
|
|
|
def berkeley_search():
|
2016-06-15 18:16:33 +00:00
|
|
|
sel = selenium_driver(browser='firefox')
|
2012-03-20 18:21:06 +00:00
|
|
|
sel.get("http://berkeley.edu")
|
|
|
|
search = WebDriverWait(sel,5).until(lambda d: d.find_element_by_css_selector('input[id="search_text"]'))
|
|
|
|
search.send_keys("quantum computing")
|
|
|
|
|
|
|
|
return sel
|
|
|
|
|
|
|
|
# wait for a bit and then highlight the text and fill it out with "Bach" instead
|
|
|
|
# I was looking at using XPath natively in Firefox....
|
|
|
|
# https://developer.mozilla.org/en/Introduction_to_using_XPath_in_JavaScript#Within_an_HTML_Document
|
|
|
|
# document.evaluate('//input[@id="search_text"]', document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null ).snapshotItem(0);
|
|
|
|
|
2012-03-14 22:06:29 +00:00
|
|
|
def suites():
|
|
|
|
testcases = [GoogleWebDriverTest]
|
|
|
|
suites = unittest.TestSuite([unittest.TestLoader().loadTestsFromTestCase(testcase) for testcase in testcases])
|
|
|
|
|
|
|
|
|