height = WebUI.getElementHeight(findTestObject())
width = WebUI.getElementWidth(findTestObject())
All i know is that we can get Height and Width Separately but is there a way to get them both at once? Like the result should be like This 120x550?
height = WebUI.getElementHeight(findTestObject())
width = WebUI.getElementWidth(findTestObject())
All i know is that we can get Height and Width Separately but is there a way to get them both at once? Like the result should be like This 120x550?
There may be something in org.openqa.selenium.Dimension
that might help but really, I think writing your own Keyword would probably be better.
Thank you, i’ll get back to this thread if it works
I’d prefer you get back either way
Well i can’t quite know how to use keywords properly when it comes to the width and height being on the same class
What do you mean?
Like on how can i get the Width X Height Result in one custom keyword
String wXh(TestObject to) {
String w = WebUI.getElementWidth(to).toString()
String h = WebUI.getElementHeight(to).toString()
return w + "x" + h
}
Alec,
Your question was already answered in post 2. You need a custom keyword.