From 85bae2c535db3d896d3b5b65ef14bc3fa84d8ddc Mon Sep 17 00:00:00 2001 From: Jusong Yu Date: Fri, 6 Oct 2023 10:54:35 +0000 Subject: [PATCH] fix notebook --- tests_notebooks/test_notebooks.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests_notebooks/test_notebooks.py b/tests_notebooks/test_notebooks.py index f8b42bf57..655e84548 100644 --- a/tests_notebooks/test_notebooks.py +++ b/tests_notebooks/test_notebooks.py @@ -120,7 +120,7 @@ def test_computational_resources_code_setup( assert "cp2k" not in output driver = selenium_driver("notebooks/computational_resources.ipynb") - driver.set_window_size(800, 800) + driver.set_window_size(800, 1600) # click the "Setup new code" button driver.find_element(By.XPATH, '(//button[text()="Setup new code"])[1]').click() @@ -136,15 +136,17 @@ def test_computational_resources_code_setup( # fill the SSH username driver.find_element( - By.XPATH, "(//label[text()='username:'])[1]/following-sibling::input" + By.XPATH, "(//label[text()='SSH username:'])[1]/following-sibling::input" ).send_keys("dummyuser") driver.find_element( By.XPATH, "(//label[text()='Slurm account'])[1]/following-sibling::input" ).send_keys("dummyuser") - # click the quick setup - driver.find_element(By.XPATH, '(//button[text()="Quick setup"])').click() + # click the quick setup (contain text "Quick setup") + driver.find_element( + By.XPATH, '(//button[contains(text(),"Quick setup")])[1]' + ).click() time.sleep(1.0) # check the new code pw-7.0@daint-mc is in code list