When using the getSize
method, I am able to determine the size of an element but I am struggling to understand how to change its height
.
To provide some additional context, my goal is to verify if a user can resize a textarea
element. Should I simply adjust the height manually or is there a way to mimic user interaction with the element?
Thank you for your assistance.
Solution
Here is how I approached it:
myElement.getSize().then(function(result){
browser.driver.actions()
.mouseMove(inputElement, {x: result.width-1, y: result.height-1})
.mouseDown()
.mouseMove(inputElement, {y: newHeight })
.mouseUp()
.perform()
});
This approach allows me to simulate user interaction for resizing the textarea element.