Changed world.browser.find_by_css to world.css_find
This commit is contained in:
@@ -115,7 +115,7 @@ def revert_setting_entry(label):
|
||||
@world.absorb
|
||||
def get_setting_entry(label):
|
||||
def get_setting():
|
||||
settings = world.browser.find_by_css('.wrapper-comp-setting')
|
||||
settings = world.css_find('.wrapper-comp-setting')
|
||||
for setting in settings:
|
||||
if setting.find_by_css('.setting-label')[0].value == label:
|
||||
return setting
|
||||
@@ -125,7 +125,7 @@ def get_setting_entry(label):
|
||||
@world.absorb
|
||||
def get_setting_entry_index(label):
|
||||
def get_index():
|
||||
settings = world.browser.find_by_css('.wrapper-comp-setting')
|
||||
settings = world.css_find('.wrapper-comp-setting')
|
||||
for index, setting in enumerate(settings):
|
||||
if setting.find_by_css('.setting-label')[0].value == label:
|
||||
return index
|
||||
|
||||
@@ -135,7 +135,7 @@ def set_the_weight_to_abc(step, bad_weight):
|
||||
|
||||
@step('if I set the max attempts to "(.*)", it will persist as a valid integer$')
|
||||
def set_the_max_attempts(step, max_attempts_set):
|
||||
#on firefox with selenium, the behaviour is different. eg 2.34 displays as 2.34 and is persisted as 2
|
||||
# on firefox with selenium, the behaviour is different. eg 2.34 displays as 2.34 and is persisted as 2
|
||||
index = world.get_setting_entry_index(MAXIMUM_ATTEMPTS)
|
||||
world.css_fill('.wrapper-comp-setting .setting-input', max_attempts_set, index=index)
|
||||
if world.is_firefox():
|
||||
|
||||
Reference in New Issue
Block a user