Allow @tables.bind_row_action() to bind in 2 additional scenarios
First, it's now able to bind destructive actions rendered with button.btn-dander. Second, now it successfully matches a single primary action (button outside of div.btn-group container). Change-Id: I1c55dc10b344c4899a80d83f4d18e59d5df266a6 Closes-Bug: #1537526
This commit is contained in:
parent
78cbb5eec2
commit
4b83421bf5
@ -224,15 +224,17 @@ def bind_row_action(action_name, primary=False):
|
||||
a button drop-down needs to be clicked prior to clicking a button.
|
||||
Defaults to `False`.
|
||||
"""
|
||||
# NOTE(tsufiev): button tag could be either <a> or <button> - target
|
||||
# both with *. Also primary action could be single as well, do not use
|
||||
# .btn-group because of that
|
||||
primary_action_locator = (
|
||||
by.By.CSS_SELECTOR,
|
||||
'td.actions_column > .btn-group > a.btn:nth-child(1)')
|
||||
by.By.CSS_SELECTOR, 'td.actions_column *.btn:nth-child(1)')
|
||||
secondary_actions_opener_locator = (
|
||||
by.By.CSS_SELECTOR,
|
||||
'td.actions_column > .btn-group > a.btn:nth-child(2)')
|
||||
'td.actions_column > .btn-group > *.btn:nth-child(2)')
|
||||
secondary_actions_locator = (
|
||||
by.By.CSS_SELECTOR,
|
||||
'td.actions_column > .btn-group > ul.row_actions > li > a')
|
||||
'td.actions_column > .btn-group > ul.row_actions > li > a, button')
|
||||
|
||||
def decorator(method):
|
||||
@functools.wraps(method)
|
||||
|
Loading…
x
Reference in New Issue
Block a user