问题
Is there a way to make a global change to the default timeout for the element level waits in the page-object gem? We use the default 5 seconds but need to change it once in a while depending on the environment. Our main test environment runs on several servers so responds times are very fast. However we have one or two environments that run on one server only and respond times are a little slow. I would like to change this value based on the environment. I realize this is not ideal but it is something I was asked to look into.
Thanks.
回答1:
https://github.com/cheezy/page-object/issues/79
Two things to set. PageObject.default_page_wait will set the default timeout value for page level actions and PageObject.default_element_wait will set the default timeout value for element level actions.
来源:https://stackoverflow.com/questions/21394177/changing-default-timeout-of-element-level-waits-in-page-object-gem