Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6974)

Unified Diff: chrome/test/functional/extensions.py

Issue 9696018: Update pyauto tests to work with the uber page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/functional/chromeos_time.py ('k') | chrome/test/functional/history.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/functional/extensions.py
===================================================================
--- chrome/test/functional/extensions.py (revision 126676)
+++ chrome/test/functional/extensions.py (working copy)
@@ -24,17 +24,17 @@
class ExtensionsPage(object):
- """Access options in extensions page (chrome://settings/extensions)."""
+ """Access options in extensions page (chrome://extensions-frame)."""
- _URL = 'chrome://settings/extensions'
+ _URL = 'chrome://extensions-frame'
def __init__(self, driver):
self._driver = driver
self._driver.get(ExtensionsPage._URL)
def CheckExtensionVisible(self, ext_id):
- """Returns True if |ext_id| Enabled checkbox exists on page."""
- return len(self._driver.find_elements_by_id('toggle-%s' % ext_id)) == 1
+ """Returns True if |ext_id| exists on page."""
+ return len(self._driver.find_elements_by_id(ext_id)) == 1
def SetEnabled(self, ext_id, enabled):
"""Clicks on 'Enabled' checkbox for specified extension.
@@ -43,7 +43,9 @@
ext_id: Extension ID to be enabled or disabled.
enabled: Boolean indicating whether |ext_id| is to be enabled or disabled.
"""
- checkbox = self._driver.find_element_by_id('toggle-%s' % ext_id)
+ checkbox = self._driver.find_element_by_xpath(
+ '//*[@id="%s"]//*[@class="enable-controls"]//*[@type="checkbox"]' %
+ ext_id)
if checkbox != enabled:
checkbox.click()
# Reload page to ensure that the UI is recreated.
@@ -58,10 +60,8 @@
disallowed in incognito.
"""
checkbox = self._driver.find_element_by_xpath(
- '//*[@id="%s"][@type="checkbox"]' % ext_id)
- # Expand extension and click on 'Allow in incognito'.
- if not checkbox.is_displayed():
- self._driver.find_element_by_id('%s_zippy' % ext_id).click()
+ '//*[@id="%s"]//*[@class="incognito-control"]//*[@type="checkbox"]' %
+ ext_id)
if checkbox.is_selected() != allowed:
checkbox.click()
# Reload page to ensure that the UI is recreated.
@@ -76,10 +76,8 @@
file URLs.
"""
checkbox = self._driver.find_element_by_xpath(
- '(//*[@id="%s"][@type="checkbox"])[2]' % ext_id)
- # Expand extension and click on 'Allow access to file URLs'.
- if not checkbox.is_displayed():
- self._driver.find_element_by_id('%s_zippy' % ext_id).click()
+ '//*[@id="%s"]//*[@class="file-access-control"]//*[@type="checkbox"]' %
+ ext_id)
if checkbox.is_selected() != allowed:
checkbox.click()
« no previous file with comments | « chrome/test/functional/chromeos_time.py ('k') | chrome/test/functional/history.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698