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

docs: define java specific waitFor* methods #5315

Merged
merged 12 commits into from Feb 5, 2021

Conversation

yury-s
Copy link
Member

@yury-s yury-s commented Feb 4, 2021

No description provided.

@yury-s yury-s requested review from pavelfeldman and dgozman and removed request for pavelfeldman February 4, 2021 20:48

### param: Page.waitForFrameNavigated.callback = %%-java-wait-for-event-callback-%%

## method: Page.waitForPageError
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we don't need this one?
Also, I am not sure about waitForFrameAttached, waitForFrameDetached, waitForRequestFailed/Finished, waitForSocketError.

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, it is actually used in TestWorker.shouldReportErrors test today, without it the test would be more cumbersome. Same with waitForRequestFailed. waitForFrameAttached does as much sense as the frameAttached event itself, so I'd leave it there.

What is your criteria for leaving/removing some of these methods?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ok, I reconsidered this. The error condition should be exceptions rather then something that people put into the expectations and we already have waitForRequest/Response methods so adding waitForRequestFailed would just confuse people. There are no tests right now that use wait for frame attached/detached, so removing those too. Let's add them if there if there our clients ask for them.

@yury-s
Copy link
Member Author

yury-s commented Feb 5, 2021

Merged with python's docs, corresponding playwright.dev change: microsoft/playwright.dev#108

docs/src/api/class-browsercontext.md Outdated Show resolved Hide resolved
docs/src/api/class-page.md Outdated Show resolved Hide resolved
docs/src/api/class-page.md Outdated Show resolved Hide resolved
docs/src/api/class-page.md Outdated Show resolved Hide resolved

## method: WebSocket.waitForFrameReceived
* langs: csharp, java
- returns: <[WebSocketFrame]>
Copy link
Contributor

Choose a reason for hiding this comment

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

What is WebSocketFrame? I see [string]|[Buffer] above.

Copy link
Member Author

Choose a reason for hiding this comment

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

There is no way to defined such type union in java so I use a dedicated type for that. Will be happy to change that to something more elegant, let's discuss offline.

docs/src/api/class-websocket.md Outdated Show resolved Hide resolved
@yury-s yury-s merged commit 28e5975 into microsoft:master Feb 5, 2021
@yury-s yury-s deleted the wait-for-event-java branch February 5, 2021 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants