Issue
i am new to use protractor. There is an html element which its only unique part is url of background image in style attribute. You can see below.
<div _ngcontent-jaf-c293="" class="ng-star-inserted" style="background-image:
url("/assets/map-markers/vms-marker.png"); background-repeat: no-repeat;
background-size: 100% 100%; height: 44.1px; width: 27.5625px;"></div>
I tried to get this element.(see below)
var created = element(by.xpath('//div[contains(@style,"background-image: url(\"/assets/map-markers/vms-marker.png\");")]'));
I am gettting syntax error. How to write expression to get this element? Or is it possible to get element with the style attribute?
Solution
var marker = element(by.xpath("//div[@style[contains(.,'vms-marker.png')]]")); worked
Answered By - aborted
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.