Not able to play Video using Test Cafe, Click event is not playing video. I am able to hover till specific element but when i click it should start playing the video. But it is unable to play.
const logger = RequestLogger({ url: 'URL', method: 'post' },
{ logResponseBody: true, logRequestBody: true, stringifyResponseBody: true, stringifyRequestBody: true });
const obj = 'URL';
await t.navigateTo(obj.uri);
const loader = Selector('.web_player_loader.loader');
await t.expect(loader.exists).notOk({ timeout: 30000 });
console.log('Video Started....');
const playerBase=Selector('.player-base');
await t.hover(playerBase);
await t.click(playerBase);
console.log('Logger Request Length is ',logger.requests.length);```
I am running the script using following params.
testcafe chrome --autoplay-policy=no-user-gesture-required ./tests -s takeOnFails=true --skip-js-errors=true
Getting this error in the Console.
main.dad0fa6441f0af49d386.js:2 Uncaught (in promise) TypeError: Cannot read property 'topLPVs' of undefined
at t.value (main.dad0fa6441f0af49d386.js:2)
at e.value (main.dad0fa6441f0af49d386.js:2)
at e.value (main.dad0fa6441f0af49d386.js:2)
at t.<anonymous> (main.dad0fa6441f0af49d386.js:2)
at l (vendor~main.58.ac1d1027b98ee8b3b2d1.js:9)
at Generator._invoke (vendor~main.58.ac1d1027b98ee8b3b2d1.js:9)
at Generator.next (vendor~main.58.ac1d1027b98ee8b3b2d1.js:9)
at n (hammerhead.js:15)
at value (hammerhead.js:6)
at n (vendor~main.58.ac1d1027b98ee8b3b2d1.js:2)
at a (vendor~main.58.ac1d1027b98ee8b3b2d1.js:2)
Aucun commentaire:
Enregistrer un commentaire