滾動條分為倆種,一:主頁面中的滾動條。二:頁面中的子頁面的滾動條。
每種滾動條有都分為上下滑動與左右滑動。
下面分別介紹:
一:主頁面的滾動條上下滑動:
execute javascript document.querySelector("body").scrollTop=${value} (參數化了數值,如:500)
主頁面的滾動條左右滑動:
execute javascript document.querySelector("body").scrollLeft=${value} (參數化了數值,如:100)
二:子頁面的滾動條上下滑動:
execute javascript document.querySelector("#id").scrollTop=${value}
子頁面的滾動條上下滑動:
execute javascript document.querySelector("#id").scrollLeft=${value}