小编jjh*_*s57的帖子

Selenium Webdriver测试期间Firefox的多个实例无法正确处理焦点.

我注意到,在网格上并行运行多个selenium firefox测试时焦点事件处理无法正常工作.我已经确认,当我的每个测试单独运行并且考虑到操作系统的重点时,测试会在100%的时间内通过.我还在Chrome网格上并行运行测试,但没有看到问题.

我在google groups上找到了以下主题,建议在xvfb的单独实例中启动每个浏览器可能是一个可行的解决方案. https://groups.google.com/forum/?fromgroups#!topic/selenium-developers/1cAmsYCp2ho%5B1-25%5D

测试的部分失败是由于项目中使用的jquery日期选择器.日期选择器在焦点事件上启动,并且由于有多个selenium测试同时执行webdriver测试执行.click()命令,但焦点不会保持足够长的时间以显示日期选择器小部件.

.focus(function(){$ input.trigger("focus");});

我的问题是,如果有人之前已经看过这个并通过一些firefox配置文件设置解决了它.我已经尝试加载以下对该问题没有影响的属性.

profile.setAlwaysLoadNoFocusLib(true);
Run Code Online (Sandbox Code Playgroud)

测试失败的方式与之前在远程驱动程序Firefox配置文件中启用并加载该属性的方式相同.

我需要一种方法确保在100%的时间内触发焦点事件或解决多个firefox浏览器竞争焦点的问题.考虑到Chrome没有显示这些问题,我想知道它是否也可能被认为是Firefox中的一个错误.

谢谢!

firefox selenium webdriver ui-automation selenium-webdriver

8
推荐指数
1
解决办法
3631
查看次数

Sinatra在ctrl-c之后重新启动Webrick Server

require 'sinatra'
require 'rubygems'

class TestServer < Sinatra::Application
set :port, 22340
    get '/' do
        "Hello World"
    end
    run! if app_file == $0
end
Run Code Online (Sandbox Code Playgroud)

Ruby 2.0.0-p0和Sinatra 1.4.2的非常简单的应用程序

当我按ctrl-c时webrick服务器在默认端口上重新启动...请参阅下面的输出

LM-BOS-00715009:server joshughes$ ruby test.rb 
[2013-04-19 16:07:48] INFO  WEBrick 1.3.1
[2013-04-19 16:07:48] INFO  ruby 2.0.0 (2013-02-24) [x86_64-darwin11.4.2]
== Sinatra/1.4.2 has taken the stage on 22340 for development with backup from WEBrick
[2013-04-19 16:07:48] INFO  WEBrick::HTTPServer#start: pid=63798 port=22340
^C
== Sinatra has ended his set (crowd applauds)
[2013-04-19 16:07:56] INFO  going to shutdown ...
[2013-04-19 …
Run Code Online (Sandbox Code Playgroud)

ruby webrick sinatra

4
推荐指数
1
解决办法
936
查看次数

Jenkins HelloWorld插件在重启后不会保留配置

我一直在尝试创建我的第一个jenkins插件.一切都很好,除了重新启动jenkins服务后全局配置不会持久.

只要服务没有重新启动,配置就可以保存.

全局配置果冻文件......

<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
Run Code Online (Sandbox Code Playgroud)

Jenkins uses a set of tag libraries to provide uniformity in forms.
To determine where this tag is defined, first check the namespace URI,
and then look under $JENKINS/views/. For example, <f:section> is defined
in $JENKINS/views/lib/form/section.jelly.

It's also often useful to just check other similar scripts to see what
tags they use. Views are always organized according to its owner class,
so it should be straightforward to find them.
--> …
Run Code Online (Sandbox Code Playgroud)

jenkins jenkins-plugins

2
推荐指数
1
解决办法
2751
查看次数