在文本字段中输入文本后,我需要自动执行在键盘上按"Enter"键的操作.我尝试了@browser.send_keys :enter
但是没有采取行动.也试图@browser.text_field(:name => 'q').send_keys :enter
或@browser.text_field(:name => 'q').focus
再send_keys.但没有帮助.
@browser.send_keys("{ENTER}")
Run Code Online (Sandbox Code Playgroud)
这也没有帮助,这实际上是类型("{ENTER}")
请告诉我其他的做法?
如何在Watir中滚动Web应用程序?
我试过了@browser.send_keys :space
这只会让整个页面失效.但是我在应用程序中有一个滚动,我需要在自动化测试中向下滚动垂直滚动条,请帮助我!
谢谢!
<div dojoattachpoint="containerNode" class="containerNode tabContentPane typeNavigationSingleChild" style="overflow: auto; left: 5px; top: 10px; width: 1549px; height: 535px;">
<div pageid="lifecycle_theme_home_page_dashboard_pageId" id="lifecycle_theme_home_page_dashboard_pageId" style="height: 535px; padding: 0px; width: 1549px;" widgetid="lifecycle_theme_home_page_dashboard_pageId" title="" role="group" class="dijitContentPane wcs-nullLayout">
Run Code Online (Sandbox Code Playgroud)