I'm having a bit of a problem with protractor. I actually need the width and height of an element. On the element a transform will be done and a scale will be set.
I actually need the scaled width and height of that element using protractor.
I already have the width and height using the getSize() function but the returned value is the original width and height and not the scaled width and height.
I would try with clientWidth
and clientHeight
:
protractor.promise.all([
elm.getAttribute("clientWidth"),
elm.getAttribute("clientHeight")
]).then(function (dimensions) {
console.log(dimensions);
});
elm.getCssValue("width")
and elm.getCssValue("height")
are another alternatives.
Also see:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.