mercredi 3 octobre 2018

Parsing JavaScript in a Ruby Cucumber Code

I'm using Ruby Cucumber in my project and I need to check the result of a request (that's an HTML) and I would like to access an specific node through document.querySelector("myNode").

I'm getting an exception that tells me the "document"(from document.querySelector) does not exists. I'm thinking that the Cucumber does not recognizes my JavaScript code inside my Ruby Cucumber code.

I would like to know how to evaluate an JavaScript code inside Ruby Cucumber code.

Does anyone knows if and how I can do it?

Aucun commentaire:

Enregistrer un commentaire