Skip to content

Commit

Permalink
add sleep 3s
Browse files Browse the repository at this point in the history
  • Loading branch information
Dou Du committed May 18, 2024
1 parent 247dc43 commit c139e7d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def setup_method(self, method):

def teardown_method(self, method):
self.driver.quit()

def test_one_quantumwell(self):
self.driver.get("http://localhost:8383/voila/render/index.ipynb")
self.driver.set_window_size(1280, 720)
Expand All @@ -35,12 +35,13 @@ def test_one_quantumwell(self):
def test_asymmetricwell(self):
self.driver.get("http://localhost:8383/voila/render/index.ipynb")
self.driver.set_window_size(1280, 720)
time.sleep(3)
self.driver.find_element(By.LINK_TEXT, "Avoided Crossings in a 1D Asymmetric Quantum Well").click()
time.sleep(5)
self.driver.execute_script("window.scrollTo(0, 400)")
self.driver.find_element(By.CSS_SELECTOR, "label:nth-child(2) > input").click()
time.sleep(5)

download = self.driver.find_elements(By.XPATH, "//button[@title='Download plot']")[0]
actions = ActionChains(self.driver)
actions.move_to_element(download).click().perform()
Expand Down

0 comments on commit c139e7d

Please sign in to comment.