1

I am trying to test are webpage on mobile and its clicking the play button on a video but not playing the video. It runs fine on desktop browsers. I have tried the following commands testcafe remote test/testCafe/was_test.js -e --autoplay-policy=no-user-gesture-required below is my code that is used to click the play button.

test('see if video plays', async t => {
        await t.wait(10000) //this is to wait for the page to load
        data = await getdata()
        const playButton = await Selector('.plyr__control--overlaid')
        await t.click(playButton)
})
Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47

1 Answers1

1

Remote browsers do not support specifying arguments in this manner. See:

Start a Browser With Arguments

Browsers on Remote Devices

You might want to toggle your browser's default options, e.g.:

How to control audio and video autoplay in Google Chrome

Alex Skorkin
  • 4,264
  • 3
  • 25
  • 47