From 3bc71d27685ca51032d93ef0b0b7f271840726b8 Mon Sep 17 00:00:00 2001 From: Dou Du Date: Wed, 29 May 2024 16:15:47 +0200 Subject: [PATCH] click Sn element --- example/example.ipynb | 2 +- test/test.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/example/example.ipynb b/example/example.ipynb index 65bc144..1bc0922 100644 --- a/example/example.ipynb +++ b/example/example.ipynb @@ -327,7 +327,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.0" + "version": "3.11.7" }, "voila": { "authors": "Dou Du, Casper Welzel Andersen and Giovanni Pizzi" diff --git a/test/test.py b/test/test.py index 3713850..6456487 100644 --- a/test/test.py +++ b/test/test.py @@ -28,7 +28,9 @@ def download_widget_image(self): self.driver.set_window_size(1280, 1080) time.sleep(3) self.driver.save_screenshot("widget-01.png") - self.driver.execute_script("window.scrollTo(0,document.body.scrollHeight)") + + element = driver.find_element(By.CLASS_NAME, 'element-Sn') + element.click() time.sleep(3) self.driver.save_screenshot("widget-02.png")