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

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -