-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Retry Logic for Selenium Steps #407
Comments
Awesome thanks! I guess this is only for a subset of Selenium actions, isn't it? Could you please share a list of actions/steps where you think the retry logic makes sense? |
We've added it for each step since a previous selenium step may be ongoing on some selenium node. |
We could introduce a common retry attempt setting just like JDBC steps are doing (https://github.com/citrusframework/yaks/blob/main/java/steps/yaks-jdbc/src/main/java/org/citrusframework/yaks/jdbc/JdbcSettings.java) so users can enable/disable retry with these settings: Given Selenium max retry attempts: 10
Given Selenium retry delay: 500ms Also a env setting is available to set the retry globally:
I would vote for having retry logic disabled by default (YAKS_SELENIUM_MAX_RETRY_ATTEMPTS=0) |
That would be fine for Our use case. Our Observation Was That e.g clicking
a Button and validating a second Element than requires a retry since most
Browser interactions are slower than our steps execution
Christoph Deppisch ***@***.***> schrieb am Mo., 30. Mai 2022,
10:48:
… We could introduce a common retry attempt setting just like JDBC steps are
doing (
https://github.com/citrusframework/yaks/blob/main/java/steps/yaks-jdbc/src/main/java/org/citrusframework/yaks/jdbc/JdbcSettings.java)
so users can enable/disable retry with these settings:
Given Selenium max retry attempts: 10Given Selenium retry delay: 500ms
Also a env setting is available to set the retry globally:
YAKS_SELENIUM_MAX_RETRY_ATTEMPTS=10
YAKS_SELENIUM_DELAY_BETWEEN_RETRY_ATTEMPTS=1000
I would vote for having retry logic disabled by default
(YAKS_SELENIUM_MAX_RETRY_ATTEMPTS=0)
—
Reply to this email directly, view it on GitHub
<#407 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABMAAQOTHUQFONAUBFOPRSLVMR6F7ANCNFSM5VRP7WTQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
It would be nice to have a retry logic for SeleniumSteps. We've implemented our own Workaround like so:
runner.run(RepeatOnErrorUntilTrueTemplate.builder()
.indexName(indexName)
.maxRepeats(maxRepeatsOnError)
.autoSleep(autoSleep)
.actions(Arrays.asList(actionBuilders))
.build());
We've also added an own wrapper for RepeatOnErrorUntilTrue using the Catch Action too. This was necessary since SeleniumSteps may throw Selenium exceptions, but RepeatOnErrorUntilTrue only catches the CitrusRuntimeException. By using the CatchAction without expected exception list we get the desired behaviour since the CatchAction will throw our required CitrusRuntimeException in that case.
Kind regards,
Stefan
The text was updated successfully, but these errors were encountered: