机器人框架中元素的背景颜色

Background color of an element in robot framework

有没有办法在机器人框架中找到以下内容?

  1. 元素的背景颜色。
  2. 元素是否可点击。
  1. ${bgcolor} Execute Javascript return document.defaultView.getComputedStyle(document.getElementById("myElementID"),null)['background-color']
  2. 取决于 "clickable" 的含义。所有元素都是可点击的。

假设您使用 Selenium2Library。

Selenium2Screenshots 库有一个名为 Update Element Style 的关键字,它使用 jQuery 来更新元素样式。基本和上面说的一样,只是用起来更方便