44from selenium .common .exceptions import TimeoutException
55from selenium .webdriver .chrome .service import Service
66from selenium .webdriver .chrome .options import Options
7+ from selenium .webdriver .common .action_chains import ActionChains
78from selenium .webdriver .common .by import By
89from selenium .webdriver .support .ui import WebDriverWait
910from selenium .webdriver .support import expected_conditions as EC
@@ -31,10 +32,6 @@ def wait_for_element(self, by, value, timeout=30):
3132 EC .presence_of_element_located ((by , value ))
3233 )
3334
34- def click_element (self , by , value ):
35- element = self .driver .find_element (by , value )
36- element .click ()
37-
3835 def get_element_text (self , by , value ):
3936 return self .driver .find_element (by , value ).text
4037
@@ -51,21 +48,25 @@ def get_sha256_checksum(self):
5148 print ("Website opened" )
5249
5350 # Wait until the 'File Signatures' button with the known ID is present
54- self .wait_for_element (By .ID , "accordion__heading-raa-1 " )
51+ self .wait_for_element (By .ID , "accordion__heading-:r1: " )
5552 print ("File Signatures button found" )
5653
57- # Click the 'File Signatures' button with the known ID
58- self .click_element (By .ID , "accordion__heading-raa-1" )
54+ # Scroll to (waiting for animation) and Click the 'File
55+ # Signatures' button with the known ID
56+ header_element = self .driver .find_element (By .ID , "accordion__heading-:r1:" )
57+ ActionChains (self .driver ).move_to_element (header_element ).perform ()
58+ time .sleep (1 )
59+ header_element .click ()
5960 print ("File Signatures button clicked" )
6061
6162 # Wait for the checksums panel to be visible
62- self .wait_for_element (By .ID , "accordion__panel-raa-1 " )
63+ self .wait_for_element (By .ID , "accordion__panel-:r1: " )
6364 time .sleep (3 )
6465 print ("Checksums panel found" )
6566
6667 # Extract the checksums content
6768 checksums_content = self .get_element_text (
68- By .ID , "accordion__panel-raa-1 "
69+ By .ID , "accordion__panel-:r1: "
6970 )
7071 print ("Checksums content extracted" )
7172
0 commit comments