How can I check if the video in the main page is autoplay and endless loop? I need the code for that in Open test, can be selenium with java, javascript or python
Asked
Active
Viewed 339 times
0
-
Show us your code and we will be able to help. – Jonah Jun 07 '20 at 03:38
1 Answers
0
This post needs more info, but if I'm to assume you are talking about a <video>
in your html you can do something like this. (This example is in Python)
# autoplay attribute doesn't have a value attached to it
# so you'll have to find it with a css selector
try:
# If it finds the element it is autoplay.
video = driver.find_element_by_css_selector('video[autoplay]')
except:
pass # Video is not autoplay.

Dillon Miller
- 763
- 1
- 6
- 18