You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You might ask, why didn't we have config.click_by_js till now?
Because making all clicks js based is not a "normal case".
You might need to speed up all "set value" in your tests, but command.js.click will not speed up anything.
Yet, sometimes, it might be useful as workaround.
In such cases - it was considered a good practice to use
element.perform(command.js.click)
to achieve the goal in less concise way,
thus, identifying by this "awkwardness" that it is really a workaround;)
Yet, the latter was pretty subjective... And one would like to hide such awkwardness via element.with_(click_by_js=True), so when we call element.click - it looks nicer :)
Reasoning...
In the past we considered a good practice to not hide js workarounds in context of clicking... the latter was pretty subjective... And one would like to hide such awkwardness via element.with_(click_by_js=True), so when we call element.click - it looks nicer :) – same way as we can do with type_by_js, set_value_by_js, etc.
TODO: cover with tests;)
- probably in same element__click_test.py, maybe grouping all click_by_js tests in a test class (as sub-test-suite)
- there should be at least four positive tests with covered by overlay element, that cover:
- Browser(Config(click_by_js=True)),
- browser.with_(click_by_js=True),
- browser.element('#second').with_(click_by_js=True).click()
- browser.config.click_by_js = True (with teardown to reset this opt to default)
- and probably one negative test, that fails to click on covered element, because by default click_by_js is False
No description provided.
The text was updated successfully, but these errors were encountered: