Monika Garg Bansal
Monika Garg Bansal

Reputation: 31

When TestCafe is ran, Page does not seem to load

Using testcafe, I am trying to open the page https://tribegrouptravel.com. When I run the command testcafe chrome test.js it brings up the browser and starts the test, but the page keeps spinning.

Here is the code.

    import { Selector } from 'testcafe';
         fixture`Getting Started`.page('https://tribegrouptravel.com')

         const skipTheLines = Selector('div > button').withText('Skip these tips');

         test('Successful Login', async t => {
         // Test code
               await t
              .wait(3000)
              .click(skipTheLines)
              .wait(4000);

      });

The page opens in the Chrome browser without testcafe.

Following are the versions

testcafe version: 1.6.1 node.js version: v10.16.3 command-line arguments: "testcafe chrome -e loginTest.js" browser name and version: Chrome: 78.0.3, Safari: 13.0.3 platform and version: Mac OS X 10.14.6

Upvotes: 3

Views: 3361

Answers (1)

Shimon S
Shimon S

Reputation: 4186

I came across the same problem
I noticed that by default Testcafe is trying to start test on 10.0.0.2
Changed it to localhost:
testcafe chrome test1.js --hostname localhost
and it solved the problem.

Upvotes: 3

Related Questions