小编cde*_*oix的帖子

org.openqa.selenium.WebDriverException:无法在45000 ms内绑定到锁定端口7054

我在firefox浏览器中执行selenium脚本时遇到问题.

控制台错误:

        org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms
        Build info: version: '2.39.0', revision: 'ff23eac', time: '2013-12-16 16:11:15'
        System info: host: 'usnywqa01', ip: '10.3.3.20', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_17'
        Driver info: driver.version: FirefoxDriver
        Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
        System info: host: abc-PV-5', ip: 'XX.X.XX.XX', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.7.0_07'
        Driver info: driver.version: FirefoxDriver
        at org.openqa.selenium.internal.SocketLock.lock(SocketLock.java:98)
        at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:84)
        at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:250)
        at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:110)
        at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:197)
        at …

selenium-grid selenium-webdriver

5
推荐指数
1
解决办法
1万
查看次数

NSPrintInfo printSettings 不符合 KVO 标准,尽管标题中有评论这么说

背景:我正在将打印面板附件视图添加到打印对话框(使用addAccessoryController:),其中控件绑定到 NSPrintInfo printSettings 值,以便这些值保存在打印预设中。我在观察 printSettings 更改时遇到困难。我正在使用 SDK 10.6 进行构建,并在 OS X 10.7 上进行测试。

这是一个代码示例,在我的理解中应该可以工作,但从observeValueForKeyPath:未被调用:

- (void)testKVO
{
  NSPrintInfo *printInfo = [NSPrintInfo sharedPrintInfo];
  [printInfo addObserver:self forKeyPath:@"printSettings.foo" options:0 context:NULL];
  [printInfo setValue:@"bar" forKeyPath:@"printSettings.foo"]; // observeValueForKeyPath:ofObject:change:context: not called
}

- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
  NSLog(@"%s %@ :: %@", _cmd, keyPath, object);
}
Run Code Online (Sandbox Code Playgroud)

我也尝试直接观察 printSettings ,但没有成功,观察者方法也没有被调用( NSPrintInfo 返回的 printSettings 实际上是 class NSPrintInfoDictionaryProxy):

- (void)testKVO
{
  NSMutableDictionary *printSettings = [[NSPrintInfo sharedPrintInfo] printSettings];
  [printSettings addObserver:self forKeyPath:@"foo" options:0 context:NULL]; …
Run Code Online (Sandbox Code Playgroud)

printing macos cocoa

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