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

Not able to capture some api's called on Submit action #496

Open
snehalavhare opened this issue Feb 8, 2023 · 4 comments
Open

Not able to capture some api's called on Submit action #496

snehalavhare opened this issue Feb 8, 2023 · 4 comments
Labels

Comments

@snehalavhare
Copy link

snehalavhare commented Feb 8, 2023

Hi Team,

I am trying to capture all the api's called on clicking submit button using browser.getRequests({includePending: true }).
Total 3 api's gets called on clicking submit button: beacon, getPNR, fulfilPNR.
Right now when I click on Submit, it returns only 1 beacon api which gets called on doing any UI action. The other 2 apis are not captured.

Can't we capture other user defined api's with this service?

Wdio-intercept-service version : 4.3.1

@tehhowch
Copy link
Contributor

"gets called"

Please share the details of how these other APIs are called.
If their URLs aren't loaded via XMLHttpRequest or fetch, this service is not able to capture the associated network requests.

@snehalavhare
Copy link
Author

snehalavhare commented Feb 14, 2023

@tehhowch The other api's are called via fetch only from front end (JS). Can you please give some more details about what you are referring by fetch and XMLHttpRequest here?

@snehalavhare
Copy link
Author

snehalavhare commented Feb 20, 2023

@tehhowch, can we capture api's having internal company domain (like a**p.com) for which no proxy are required and this domain is not publicly available?

Seems like we are able to capture the beacon api which has public domain. However getPNR and fulfilPNR apis' have internal company domain. We suspect that it might be due to internal company domain we are not able to able capture these api's.

Can you please confirm?

@tehhowch
Copy link
Contributor

This service does not impose any limitations on domains that it can intercept against. If client-side JS is not able to inspect the properties of the fetch / xmlhttprequest data then I would not expect this service to be able to log the body of the request or response, but other than that...

If you suspect an issue with the interceptor, please configure a test scenario that can be used to reproduce it. This repo's test environment spins up an Express server, so you should be able to add a static page that performs analogously to your proprietary site and customize the server response too.
Failing that, please provide explicit details of the fetch invocation, including all parameters provided to the fetch instance, so that a test case can be created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants