How to verify presence of scrollbar in textarea using selenium.
问题 I have a text area in web page which has no scrollbar initially. But when i exceeds the character by 1000, scrollbar is displayed in the textarea. I have to verify the same whether scrollbar is present or not in the textarea when i click or edit the same textarea. 回答1: The client width or height will decrease if a scrollbar is added. So one way would be to check the size before and after. Here's an example (Java) : Long height_before = Long.parseLong(element.getAttribute("clientHeight"));