javascript - Get css value with phantom js -
i using cucumber , capybara run automation tests chrome , have option run them headless phantom js
i trying background-image
url value , can achieve with
element :errorcontainer, "body.error .message-container" alert = people_form.errorcontainer.native.css_value('background-image')
this return url, fails when running tests using phantom js
nomethoderror: undefined method `css_value' #<capybara::poltergeist::node tag="div">
how can background-image url here please
thanks
try in way, hope give idea:
page.find('div.user-image')['style'].should == 'background-image:url(/images/user_image.jpg)'
Comments
Post a Comment