Skip to content
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

Add support for custom duration in switchTo().frame() #1722

Merged

Conversation

donesvad
Copy link

@donesvad donesvad commented Feb 3, 2022

Proposed changes

Add support for custom duration in switchTo().frame()

Checklist

  • Checkstyle and unit tests are passed locally with my changes by running gradlew check chrome_headless firefox_headless command
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

@donesvad donesvad force-pushed the add-switch-to-frame-with-custom-duration branch 2 times, most recently from 8c5b6f7 to 46768d4 Compare February 3, 2022 18:51
@asolntsev asolntsev self-assigned this Feb 4, 2022
@asolntsev asolntsev added this to the 6.3.0 milestone Feb 4, 2022
@asolntsev asolntsev self-requested a review February 4, 2022 09:21
* @param duration the timeout duration. It overrides default Config.timeout()
*/
@Nonnull
public WebDriver frame(int index, Duration duration) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename parameter duration to timeout.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed, thx

* @param duration the timeout duration. It overrides default Config.timeout()
*/
@Nonnull
public WebDriver frame(String nameOrId, Duration duration) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename duration -> timeout

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed, thx


@AfterEach
void tearDown() {
driver().close();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need to close the browser after every test: it makes tests much slower.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed unnecessary closing

@donesvad donesvad force-pushed the add-switch-to-frame-with-custom-duration branch from 46768d4 to 8c22f03 Compare February 4, 2022 09:50
@asolntsev asolntsev merged commit 8694340 into selenide:master Feb 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants