我无法让我的量角器测试执行。无论我在启动webdriver之后输入什么内容,它都会说“尝试关闭”。
select ...
from ORDERS O left join AGENDAS A on ...
left join VIEW V on ...
where V.rn = 1 or (V.rn is null)
[11:34:38]我/开始 - 试图很好地关闭硒
这是我的配置和规范文件:
Jameson Hill@DESKTOP-GP6CRIB MINGW64 ~/desktop/test-protractor
$ webdriver-manager start
[11:34:27] I/start - java -Dwebdriver.chrome.driver=C:\Users\Jameson Hill\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.29.exe -Dwebdriver.gecko.driver=C:\Users\Jameson Hill\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\geckodriver-v0.15.0.exe -jar C:\Users\Jameson Hill\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\selenium-server-standalone-3.3.1.jar -port 4444
[11:34:27] I/start - seleniumProcess.pid: 7092
11:34:27.859 INFO - Selenium build info: version: '3.3.1', revision: '5234b32'
11:34:27.859 INFO - Launching a standalone Selenium Server
2017-04-19 11:34:27.874:INFO::main: Logging initialized @212ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:34:27.937 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:34:27.937 INFO - Driver provider com.opera.core.systems.OperaDriver registration is skipped:
Unable to create new instances on this machine.
11:34:27.937 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:34:27.937 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
11:34:27.937 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN10
2017-04-19 11:34:27.984:INFO:osjs.Server:main: jetty-9.2.20.v20161216
2017-04-19 11:34:28.015:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@685cb137{/,null,AVAILABLE}
2017-04-19 11:34:28.093:INFO:osjs.AbstractConnector:main: Started ServerConnector@49993335{HTTP/1.1,[http/1.1]}{0.0.0.0:4444}
2017-04-19 11:34:28.093:INFO:osjs.Server:main: Started @432ms
11:34:28.093 INFO - Selenium Server is up and running
protractor conf.js
});
describe('Protractor demo app', function() {
var firstNumber = element(by.model('first'));
var secondNumber = element(by.model('second'));
var goButton = element(by.id('gobutton'));
var latestResult = element(by.binding('latest'));
var history = element.all(by.repeater('result in memory'));
function add(a, b) {
firstNumber.sendKeys(a);
secondNumber.sendKeys(b);
goButton.click();
}
beforeEach(function() {
browser.get('http://juliemr.github.io/protractor-demo/');
});
it('should have a history', function() {
add(1, 2);
add(3, 4);
expect(history.last().getText()).toContain('1 + 2');
expect(history.first().getText()).toContain('3 + 4');
});
}
答案 0 :(得分:4)
无论我在启动webdriver之后输入什么内容,它都会说“尝试关闭”。
根据您提交的日志,您似乎在尝试在运行本地selenium服务器的同一窗口中输入protractor
命令。
如果确实如此,您应该知道在启动selenium服务器后不应该在控制台中输入任何内容。只需在服务器控制台上点击“Enter”即可将其关闭。
启动服务器后,您需要打开一个新控制台来执行protractor
等命令。