52 qr_buttons = options.driver.find_element(by=By.ID, value="qr-buttons")
53 if qr_buttons.is_displayed():
54 qr_buttons.find_element(by=By.LINK_TEXT, value="X").click()
55 options.driver.find_element(by=By.CSS_SELECTOR, value=("input#check%s"%postID)).click()56 if password != "":
57 delPasswordInput = options.driver.find_element(
58 by=By.CSS_SELECTOR,
65 threadID = threadRE.findall(cur_url)[0][1]
66 self.driver.find_element(
67 by=By.CSS_SELECTOR,
68 value=("input#check%s"%threadID)).click() 69 cur_url = self.driver.current_url
70 self.driver.find_element(
71 by=By.CSS_SELECTOR,
69
70 argParser.add_argument("--browser", choices=testable_browsers, required=True)
71 argParser.add_argument("--site", default=testingSite,
72 help=("Sets the site to be used for testing, defaults to %s" % testingSite))73 argParser.add_argument("--board", default=testingBoard,
74 help="Sets the board to be used for testing")
75 argParser.add_argument("--headless", action="store_true",
Extra parentheses in code can be removed for improved readability.
In the examples below, the first example is more readable than the second one.
Preferred:
if len(some_variable) + 1 < 1:
...
Not preferred:
if (len(some_variable) + 1) < 1:
...