Skip to content

Commit

Permalink
int t: Make compatible with Chromium 125
Browse files Browse the repository at this point in the history
Recent releases should be still supported but the code was not tested.
Older releases (about 119 and earlier) not supported by integration
tests anymore.
  • Loading branch information
Libor Polčák committed Jun 28, 2024
1 parent 30aac1f commit c7821a1
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/integration_tests/testing/web_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,23 @@ def find_options_jsr_page_url(self):
if 'id=jsr@javascriptrestrictor' in elem.text:
self._jsr_options_page = elem.text.split(',')[2].split('=')[1][:-1] + "options.html"
if self.type == BrowserType.CHROME:
self.driver.get('chrome://system/')
self.driver.get('chrome://system/#extensions')
sleep(2)
system_app = self.driver.find_elements(By.TAG_NAME, 'system-app')[0].shadow_root
try:
WebDriverWait(self.driver, 2).until(
ec.presence_of_element_located((By.ID, 'expandAll'))
)
self.driver.find_element(By.ID, 'expandAll').click()
system_app = system_app.find_elements(By.CSS_SELECTOR, 'key-value-pair-viewer')[0].shadow_root
except:
self.driver.find_elements(By.TAG_NAME, 'system-app')[0].shadow_root.find_elements(By.CSS_SELECTOR, 'button')[0].click()
sleep(1)
pass
try:
extensions = self.driver.find_element(By.ID, 'div-extensions-value')
except NoSuchElementException:
try:
extensions = self.driver.find_element(By.ID, 'extensions-value')
except NoSuchElementException:
system_app = self.driver.find_elements(By.TAG_NAME, 'system-app')[0].shadow_root
log_entry = system_app.find_elements(By.CSS_SELECTOR, 'log-entry')[5].shadow_root
try:
log_entry = system_app.find_elements(By.CSS_SELECTOR, 'log-entry')[5].shadow_root
except:
log_entry = system_app.find_elements(By.CSS_SELECTOR, 'key-value-pair-entry')[5].shadow_root
extensions = log_entry.find_elements(By.CLASS_NAME, 'stat-value')[0]
for elem in extensions.text.splitlines():
if 'JShelter' in elem:
Expand Down

0 comments on commit c7821a1

Please sign in to comment.