maxgalbu / nightwatch-custom-commands-assertions

Nightwatch.js custom commands and assertions
MIT License
136 stars 32 forks source link

Request: mysql assertion #16

Closed mtvan closed 8 years ago

mtvan commented 8 years ago

After doing an action, I would like to verify that in mysql it set that field to the appropriate value. In this case a simple 0 or a 1

maxgalbu commented 8 years ago

You could use the .shell() command to do something like this:

browser.shell("mysql -e 'SELECT something FROM table' --xml", function(err, stdout) {
     //parse the xml from 'stdout' and read the results
});