How to verify presence of scrollbar in textarea using selenium. -


i have text area in web page has no scrollbar initially. when exceeds character 1000, scrollbar displayed in textarea.

i have verify same whether scrollbar present or not in textarea when click or edit same textarea.

the client width or height decrease if scrollbar added. 1 way check size before , after.

here's example (java) :

long height_before  = long.parselong(element.getattribute("clientheight")); element.sendkeys("wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww") long height_after  = long.parselong(element.getattribute("clientheight"));  assert.true((height_before - height_after) > 10); 

or:

long clientheight  = long.parselong(element.getattribute("clientheight")); long offsetheight  = long.parselong(element.getattribute("offsetheight"));  assert.true((offsetheight - clientheight) > 10); 

Comments

Popular posts from this blog

account - Script error login visual studio DefaultLogin_PCore.js -

xcode - CocoaPod Storyboard error: -