Git Product home page Git Product logo

Comments (7)

bardisg avatar bardisg commented on June 24, 2024 2

Hello @tehhowch,

I have raised a PR to add support for intercepting queued beacon requests at #651

Would love to assist and get this in the next release. For the time being I unblocked myself using patch-package with the same changes.

On a sidenote, the prettier pre-push check fails with existing code from main you might want to auto format the code base once at some point.

Thanks for the great package!

from wdio-intercept-service.

bardisg avatar bardisg commented on June 24, 2024

I have a similar requirement.
To be able to intercept the requests that are generated by beacon calls (navigator.sendBeacon() method) that are of type "ping".

I assume that https://github.com/webdriverio-community/wdio-intercept-service/blob/main/lib/interceptor.js needs to have a replaceSendBeacon implementation likewise fetch and Xhr ones.

Cypress is already supporting it so I was wondering if there is any plan to add support in the near future.

from wdio-intercept-service.

tehhowch avatar tehhowch commented on June 24, 2024

I have a similar requirement. To be able to intercept the requests that are generated by beacon calls (navigator.sendBeacon() method) that are of type "ping".

I assume that https://github.com/webdriverio-community/wdio-intercept-service/blob/main/lib/interceptor.js needs to have a replaceSendBeacon implementation likewise fetch and Xhr ones.

Cypress is already supporting it so I was wondering if there is any plan to add support in the near future.

Indeed, we would need an IE-parsable (does not have to support IE, just be parsed by it) implementation of such. A PR contributing (& testing!) that functionality would be appreciated.

from wdio-intercept-service.

tehhowch avatar tehhowch commented on June 24, 2024

@ctm-adamstribblehill I would need to see the code that triggers the request, not the request details. For example, if the initiating code uses a private reference to fetch or XMLHttpRequest and does not look it up from the window, this library is not able to intercept the request.

from wdio-intercept-service.

ctm-adamstribblehill avatar ctm-adamstribblehill commented on June 24, 2024

@tehhowch This request is not directly initiated / triggered by any code that we develop.

We have a tag management system (Tealium IQ), we configure Tealium to activate the Facebook Pixel tag deployed to the page via Tealium when the appropriate conditions are met and a Tealium event is emitted. This then results in the Facebook network request to be transmitted as attached above.

I have been able to collect other network requests emitted via Tealium such as a Yahoo Dot request but this is an XHR request.

image

image

from wdio-intercept-service.

tehhowch avatar tehhowch commented on June 24, 2024

@ctm-adamstribblehill reading more closely this time, I see you are basically asking about intercepting requests made by the browser itself for e.g. the src attribute of an <image> tag. That is not currently possible with this WDIO library, because those requests do not use the fetch or XMLHttpRequest objects. See #79 for an existing issue like this.

I do not expect support to be added for non-JS requests, either, since it would (AFAICT) require protocol-level interception and this library provides functionality in all modern browsers, not just those that extend Chromium.

You will probably need to switch to some other interception library that offers tie-ins with the chrome dev tools / puppeteer.

(I welcome any corrections to my assumptions above!)

from wdio-intercept-service.

rfariasesw avatar rfariasesw commented on June 24, 2024

hey guys, we're seeing the same issue and are unable to retrieve analytics request of type 'ping'.
any news of when will this be supported?

btw thanks for the package.

from wdio-intercept-service.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.