aboutsummaryrefslogtreecommitdiff
path: root/webtests/marker_regression_test.py
diff options
context:
space:
mode:
authorZachary Sloan2013-08-21 17:47:24 -0500
committerZachary Sloan2013-08-21 17:47:24 -0500
commitf5398e8d1dde6a321d302a86fd8d8bb36789b92b (patch)
treea24013290ee45976ae3f36db6b3a80ad2e8ed082 /webtests/marker_regression_test.py
parentff209d583e0600bf8ac3efb64e59507adf77a21f (diff)
parentb9ccccf8d1cf47c33afbbb0c05d56d7a0f5039e3 (diff)
downloadgenenetwork2-f5398e8d1dde6a321d302a86fd8d8bb36789b92b.tar.gz
Merge branch 'master' of https://github.com/zsloan/genenetwork
Diffstat (limited to 'webtests/marker_regression_test.py')
-rw-r--r--webtests/marker_regression_test.py78
1 files changed, 8 insertions, 70 deletions
diff --git a/webtests/marker_regression_test.py b/webtests/marker_regression_test.py
index 3baf1e95..c4f76f53 100644
--- a/webtests/marker_regression_test.py
+++ b/webtests/marker_regression_test.py
@@ -1,7 +1,6 @@
"""
Test calculate correlations
->>> test = Test()
>>> test.get("http://genenetwork.org")
title: GeneNetwork
@@ -29,11 +28,11 @@ Click on Mapping Tools
clicked: Mapping Tools
Click on Marker Regression tab
->>> test.click('''/html/body/table/tbody/tr[3]/td/table/tbody/tr/td/form/p[8]/table/tbody/tr/td/div/ul/li[2]/a''')
+>>> test.click('''//*[@id="mapping_tabs"]/ul/li[2]/a''')
clicked: Marker Regression
Click on Compute
->>> test.click('''/html/body/table/tbody/tr[3]/td/table/tbody/tr/td/form/p[8]/table/tbody/tr/td/div/div[2]/span/table/tbody/tr/td/input''')
+>>> test.click('''//*[@id="mappingtabs-2"]/span/table/tbody/tr[1]/td/input''')
clicked: Compute
Another new window
@@ -44,74 +43,13 @@ Sleep a bunch because this can take a while
>>> sleep(60)
Ensure that the LRS of the top record is the exepcted value
->>> test.get_text('''/html/body/table/tbody/tr[3]/td/table/tbody/tr[4]/td/table/tbody/tr/td/div/table/tbody/tr[2]/td[2]''')
+>>> test.get_text('''//*[@id="1"]/td[2]''')
text: 11.511
"""
-from __future__ import print_function, division, absolute_import
-
-from browser_test import Test
-
-#
-#from time import sleep
-#
-#
-#import selenium
-#from selenium import webdriver
-#from selenium.common.exceptions import NoSuchElementException, ElementNotVisibleException
-#from selenium.webdriver.common.keys import Keys
-#
-#
-#class Test(object):
-# def __init__(self):
-# self.browser = webdriver.Chrome('/home/gn2/gn2/webtests/chromedriver')
-#
-# def get(self, url):
-# self.browser.get(url)
-# sleep(5)
-# self.title()
-#
-# def click(self, xpath_selector):
-# el = self.browser.find_element_by_xpath(xpath_selector)
-# text = el.text.strip() or el.get_attribute("value").strip()
-# el.click()
-# print("clicked:", text)
-# sleep(2)
-#
-# def click_option(self, xpath_selector, option_text):
-# el = self.browser.find_element_by_xpath(xpath_selector)
-# for option in el.find_elements_by_tag_name('option'):
-# if option.text == option_text:
-# option.click() # select() in earlier versions of webdriver
-# break
-# sleep(2)
-#
-# def enter_text(self, xpath_selector, text):
-# el = self.browser.find_element_by_xpath(xpath_selector)
-# sleep(10)
-# el.send_keys(text)
-# sleep(5)
-# # Just in case things get mangled by JavaScript, etc. we print the text for testing
-# self.get_text(xpath_selector)
-#
-# def get_text(self, xpath_selector):
-# el = self.browser.find_element_by_xpath(xpath_selector)
-# text = el.text.strip() or el.get_attribute("value").strip()
-# print("text:", text)
-#
-# def switch_window(self):
-# self.browser.switch_to_window(self.browser.window_handles[-1])
-# sleep(2)
-# self.title()
-# sleep(2)
-#
-#
-# def title(self):
-# print("title:", self.browser.title)
-
-
-
-if __name__ == '__main__':
- import doctest
- doctest.testmod()
+from __future__ import absolute_import, division, print_function
+
+from browser_run import *
+
+testmod()