1

Here is a snippet of Selenium test code that runs okay:

    it("The 1st shop should have 10 items", function() {
    return browser
        .url(cdpUrl)
        .waitForVisible('#slider0')
        .elements('#slider0 img').then(function(res) {
            expect(res.value.length).to.equal(10);
        });
    });

But what I want to do instead is replace the waitForVisible line with one that looks for a hidden input field with id='documentReady' that is dynamically inserted into the page when the page preparation is complete.

I've tried numerous things but none of them work. Any ideas?

doelleri
  • 19,232
  • 5
  • 61
  • 65
Robert W.
  • 49
  • 1
  • 4

0 Answers0