Closed AlexKamaev closed 3 years ago
It looks like we already have a similar issue https://github.com/DevExpress/testcafe/issues/2863 Since it's not implemented yet, I think we need to implement some kind of user-friendly error message in the context of this ticket.
Hi, stack overflow question poster here. Thanks for creating this! I had seen the other issue but thought it was specific to video elements. I ran into similar errors when testing media elements play() method but was able to work around it by initializing the element as muted which allows autoplay (testcafe clicking the button is identified as autoplay by the browser).
Somewhat related question: do you plan to expose media attributes (paused, currentTime, volume, muted, etc) for dom elements from selectors? Or will I need custom actions for that?
Thank you for using TestCafe. I think it's a good idea to expose media element properties through Selector properties. I've created a new suggestion for this feature: #3520.
In the meantime, you can use ClientFunctions or custom Selector properties to work with media element properties.
Hi, I am trying to test full screen button present on a video and on click of its element, I am facing same warning message on element.requestFullscreen(). Do you have any estimate when this issue will be fixed? Also, how can I use ClientFunctions or custom Selector properties as a work around ?
@vishakha-DAZN I can't give you an estimate of when this feature might be implemented. As a workaround, you can mock the requestFullscreen
method on the target element. It will suppress the error, but won't bring your page to the fullscreen layout. Check the following code as a reference:
cons mockFullcreen = ClientFunction(element => element.requestFullscreen = () => {});
await mockFullcreen(target);
await t.click(target);
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.
We're closing this issue after a prolonged period of inactivity. If it still affects you, please create a new issue with up-to-date information. Thank you.
Based on https://stackoverflow.com/questions/54936376/cannot-toggle-fullscreen-in-testcafe Test page
Test code