Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you check for a background image in nightwatch?

How do you check for a background image in nightwatch? How do you make sure a background image is correctly loaded? Background image is loaded using css.

like image 809
Brown PO Avatar asked Oct 29 '22 23:10

Brown PO


1 Answers

Hope this helps:

browser.waitForElementVisible('.someSelector', 15000)

browser.expect.element('.someSelector').to.have.css('background-image').which.equals('url("https://www.someimage.com/image1.png")');
like image 147
John Avatar answered Dec 28 '22 21:12

John