How to make an element visible using Geb?

﹥>﹥吖頭↗ 提交于 2019-12-12 04:56:06

问题


I have an element with class "popup", which i want to make visible during a functional test. What is the best way to programmatically make the element visible? I am using Geb for functional testing.


回答1:


If you use Jquery in your web pages. You could use jquery "show" method to make visible an invisible element. The code would look like this

 $(".popup", 0).jquery.show();

Note : As per documentation, the jQuery integration only works when the pages you are working with include jQuery, Geb does not install it in the page for you.



来源:https://stackoverflow.com/questions/24757979/how-to-make-an-element-visible-using-geb

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!