Clarify which shortcut is being tested in the shortcut test.

This commit is contained in:
Joao Pedro De Almeida Pereira 2018-02-20 17:32:37 +00:00 committed by Dave Page
parent 05e91044c7
commit bcb6f37d6f

View File

@ -7,9 +7,10 @@
#
##########################################################################
import os
import json
from __future__ import print_function
import time
import sys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
@ -64,6 +65,8 @@ class KeyboardShortcutFeatureTest(BaseFeatureTest):
Keys.ALT
).perform()
print("Executing shortcut: " + self.new_shortcuts[s]['locator'] + "...", file=sys.stderr, end="")
self.wait.until(
EC.presence_of_element_located(
(By.XPATH, "//li[contains(@id, " +
@ -76,6 +79,8 @@ class KeyboardShortcutFeatureTest(BaseFeatureTest):
assert is_open is True, "Keyboard shortcut change is unsuccessful."
print("OK", file=sys.stderr)
def _update_preferences(self):
self.page.find_by_id("mnu_file").click()
self.page.find_by_id("mnu_preferences").click()