Giter Site home page Giter Site logo

Comments (5)

BlaM avatar BlaM commented on May 23, 2024 2

One note in advance: I'm not yet using CodeceptJS, so anything I say now may not fit into the CodeceptJS mindset. So far we're still investigating which tool to use for our usecase.

@stanjer In my case I can find the image tag in a JavaScript object but not in the page's html code.

window.x = new Image();
window.x.src = 'http://placehold.it/350x150';

So: Yes.

That would not work however if the page had AJAXed home to the server.

@DavertMik I have never used Selenium so I don't know if there is something like PhantomJS' onResourceRequested. CodedeptJS would have to keep track of outgoing requests with that.

Maybe something like this?

I.startMonitoringWebRequests();
I.click(this.submitButton);
I.wait(1);
I.sawWebRequestUrlContaining('placehold.it');

Where the last command checks if there was at least one web request to a URL containing the specified string (since the last time we started monitoring).

Not sure if that makes any sense and if it is in scope for CodeceptJS - but it would make things easier for us.

from codeceptjs.

DavertMik avatar DavertMik commented on May 23, 2024

Nothing like that is ready yet. Can you suggest how this feature may look like?

from codeceptjs.

 avatar commented on May 23, 2024

@BlaM can you check it looking into overall html or via js?

from codeceptjs.

goschevski avatar goschevski commented on May 23, 2024

This would be very helpful.

from codeceptjs.

DavertMik avatar DavertMik commented on May 23, 2024

Yeah, good idea but I think this should be implemented as custom helper and not a general purpose method. If someone is interested they can develop and publish such helper on NPM or propose it with pull request

from codeceptjs.

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.