@world.absorb
def css_click(css_selector, index=0, wait_time=GLOBAL_WAIT_FOR_TIMEOUT, dismiss_alert=False):
 wait_for_clickable(css_selector, timeout=wait_time)
 wait_for_visible(css_selector, index=index, timeout=wait_time)
 assert_true(css_visible(css_selector, index=index), msg='Element {}[{}] is present but not visible'.format(css_selector, index))
 retry_on_exception((lambda : css_find(css_selector)[index].click()))
 if dismiss_alert:
  world.browser.get_alert().accept()
 wait_for_js_to_load()
 return True

@ world . absorb def css_click ( css_selector , index = 0 , wait_time = GLOBAL_WAIT_FOR_TIMEOUT , dismiss_alert = False ) : wait_for_clickable ( css_selector , timeout = wait_time ) wait_for_visible ( css_selector , index = index , timeout = wait_time ) assert_true ( css_visible ( css_selector , index = index ) , msg = 'Element {}[{}] is present but not visible' . format ( css_selector , index ) ) retry_on_exception ( ( lambda : css_find ( css_selector ) [ index ] . click ( ) ) ) if dismiss_alert : world . browser . get_alert ( ) . accept ( ) wait_for_js_to_load ( ) return True
perform a click on a css selector .