Skip to content

Commit

Permalink
Fix of Timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
AliasBlue committed Jul 14, 2015
1 parent 06fc65a commit 76ae05c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,17 @@ def setUp(self, browser):
if browser == 1:
self.driver = webdriver.Firefox()
#self.driver.get("http://localhost:8080/pureweb/app?client=html5&name=CartaSkeleton3&username=dan12&password=Cameron21")
self.driver.get("http://199.116.235.162:8080/pureweb/app/unix:1.0/2/20801/2?client=html5&name=CartaSkeleton3")
#self.driver.get("http://199.116.235.162:8080/pureweb/app/unix:1.0/2/20801/2?client=html5&name=CartaSkeleton3")
self.driver.get("http://142.244.190.171:8080/pureweb/app/unix:0.0/4/143/1?client=html5&name=CartaSkeleton3")
self.driver.implicitly_wait(20)

# Running on Mac (Chrome)
if browser == 2:
# Change the path to where chromedriver is located
chromedriver = "/Users/Madhatter/Downloads/chromedriver"
self.driver = webdriver.Chrome(chromedriver)
self.driver.get("http://199.116.235.162:8080/pureweb/app/unix:1.0/2/20801/2?client=html5&name=CartaSkeleton3")
# self.driver.get("http://142.244.190.171:8080/pureweb/app/unix:0.0/4/143/1?client=html5&name=CartaSkeleton3")
#self.driver.get("http://199.116.235.162:8080/pureweb/app/unix:1.0/2/20801/2?client=html5&name=CartaSkeleton3")
self.driver.get("http://142.244.190.171:8080/pureweb/app/unix:0.0/4/143/1?client=html5&name=CartaSkeleton3")
self.driver.implicitly_wait(20)

# Clear text box and change value of the text box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def _getFirstValue(self, driver):

# Go to the last channel value of the test image
def _getLastValue(self, driver):
timeout = selectBrowser._getSleep()
lastValueButton = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, "//div[@class='qx-toolbar']/div[@qxclass='qx.ui.toolbar.Button'][5]")))
self.assertIsNotNone( lastValueButton, "Could not find button to go to the last valid value")
driver.execute_script( "arguments[0].scrollIntoView(true);", lastValueButton)
Expand Down Expand Up @@ -76,6 +77,7 @@ def _animateForward(self, driver):

# Change the Channel Animator to an Image Animator
def channel_to_image_animator(self, driver):
timeout = selectBrowser._getSleep()
# Find and click on the animation window
animWindow = WebDriverWait(driver, 20).until(EC.presence_of_element_located((By.XPATH, "//div[@qxclass='skel.widgets.Window.DisplayWindowAnimation']")))
self.assertIsNotNone( animWindow, "Could not find animation window")
Expand All @@ -89,10 +91,11 @@ def channel_to_image_animator(self, driver):
ActionChains(driver).context_click( channelText ).send_keys(Keys.ARROW_DOWN).send_keys(Keys.ARROW_DOWN).send_keys(
Keys.ARROW_DOWN ).send_keys(Keys.ARROW_DOWN).send_keys(Keys.ARROW_RIGHT).send_keys(Keys.SPACE).send_keys(
Keys.ARROW_DOWN).send_keys(Keys.ENTER).perform()
time.sleep(timeout)

# Open Settings
def _openSettings(self, driver):
# Click Settings to reveal animation settings
settingsCheckBox = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.XPATH, "//div[@qxclass='qx.ui.form.CheckBox']/div[text()='Settings...']")))
self.assertIsNotNone( settingsCheckBox, "Could not find settings check box")
ActionChains(driver).click( settingsCheckBox ).perform()
ActionChains(driver).click( settingsCheckBox ).perform()

0 comments on commit 76ae05c

Please sign in to comment.