I am now write some tests with electron-spectron.
After spectrum start my app, I want to check if my video is stopped or not
the code is like
element
<video muted autoplay id='videoContainer' class='video'></video>
test code
.given("",function(){
//do something
})
.when("",function(){
//do something
})
.then("the player should stop the program", function() {
return app.client.someFuncton('//*[@id="videoContainer"]')
.then(result=>{
console.log(result) // suppose to get my video source
})
})
It seems that webdriverIO doesn't have an API like getElementById that I can use to find my video tag's source.
Do someone have any good idea?