我重新打开了与答案问题相关的问题。
所以我设置了量角器和黄瓜框架。
我尝试启动测试,但收到错误消息:
E / launcher - BUG:启动器退出,剩下1个任务
- 量角器protractor.conf.js输出
醇>
notifyDataSetChange()
- webdriver-manager start output
醇>
这是我在CLI上启动量角器protractor.conf.js文件命令时webdriver的输出:
public class DetailsActivity extends AppCompatActivity {
private List<Project> projectsList;
private ListView ProjectsLV;
private ProjectAdapter Adapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_details);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
FloatingActionButton add_fab = (FloatingActionButton) findViewById(R.id.add_fab);
FloatingActionButton remove_fab = (FloatingActionButton) findViewById(R.id.remove_fab);
Player Player = (Player)getIntent().getSerializableExtra("Player");
ArrayList<Project> Projects = (ArrayList<Project>) getIntent().getSerializableExtra("Projects");
projectsList = Plyaer.getProjects();
Adapter = new ProjectAdapter(getApplicationContext(), projectsList);
ProjectsLV = (ListView)findViewById(R.id.ProjectsListView);
ProjectsLV.setAdapter(Adapter);
add_fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Add Project", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
// create the new project and call the addProjectToList method;
prjectsList = addProjectToList(projectsList,project);
Adapter.notifyDataSetChange();
}
});
remove_fab.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Snackbar.make(view, "Remove Projects", Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
// choose the project to remove and call the removeProjectFromList method;
removeProjectFromList(projectsList,project);
Adapter.notifyDataSetChange();
}
});
}
private List<Project> addProjectToList(List<Project> projectsList,Project project){
projectsList.add(project);
return projectsList;
}
private List<Project> removeProjectFromList(List<Project> projectsList,Project project){
projectsList.remove(project);
return projectsList;
}
}
这是启动量角器后的webdriver输出。
- protractor.conf.js文件内容
醇>
这是与量角器启动相关的configuration.js文件的内容:
C:\obw\IVO_Workspace\mui-cpin-lb-spa\i\Cucumber>protractor protractor.conf.js
(node:11656) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmp
dir() instead.
[11:33:00] I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
[11:33:00] I/launcher - Running 1 instances of WebDriver
[11:33:02] E/launcher - BUG: launcher exited with 1 tasks remaining
C:\obw\IVO_Workspace\mui-cpin-lb-spa\i\Cucumber>
- Test.feature文件内容
醇>
要素文件内容:
C:\obw\IVO_Workspace\mui-cpin-lb-spa>webdriver-manager start
[11:30:43] I/start - java -Dwebdriver.chrome.driver=C:\obw\usr\npm\node_modules\
protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26.exe -Dwebdr
iver.gecko.driver=C:\obw\usr\npm\node_modules\protractor\node_modules\webdriver-
manager\selenium\geckodriver-v0.11.1.exe -jar C:\obw\usr\npm\node_modules\protra
ctor\node_modules\webdriver-manager\selenium\selenium-server-standalone-2.53.1.j
ar -port 4444
[11:30:43] I/start - seleniumProcess.pid: 10372
11:30:44.197 INFO - Launching a standalone Selenium Server
11:30:44.291 INFO - Java: IBM Corporation 2.6
11:30:44.291 INFO - OS: Windows 7 6.1 amd64
11:30:44.291 INFO - v2.53.1, with Core v2.53.1. Built from revision a36b8b1
11:30:44.338 INFO - Driver class not found: com.opera.core.systems.OperaDriver
11:30:44.338 INFO - Driver provider com.opera.core.systems.OperaDriver is not re
gistered
11:30:44.353 INFO - Driver provider org.openqa.selenium.safari.SafariDriver regi
stration is skipped:
registration capabilities Capabilities [{platform=MAC, browserName=safari, versi
on=}] does not match the current platform VISTA
11:30:44.353 INFO - Driver class not found: org.openqa.selenium.htmlunit.HtmlUni
tDriver
11:30:44.353 INFO - Driver provider org.openqa.selenium.htmlunit.HtmlUnitDriver
is not registered
11:30:44.369 INFO - Version Jetty/5.1.x
11:30:44.385 INFO - Started HttpContext[/selenium-server/driver,/selenium-server
/driver]
11:30:44.385 INFO - Started HttpContext[/selenium-server,/selenium-server]
11:30:44.385 INFO - Started HttpContext[/,/]
11:30:44.525 INFO - Started org.openqa.jetty.jetty.servlet.ServletHandler@b744f8
a0
11:30:44.525 INFO - Started HttpContext[/wd,/wd]
11:30:44.541 INFO - Started SocketListener on 0.0.0.0:4444
11:30:44.541 INFO - Started org.openqa.jetty.jetty.Server@cd61407
11:30:44.541 INFO - RemoteWebDriver instances should connect to: http://127.0.0.
1:4444/wd/hub
11:30:44.541 INFO - Selenium Server is up and running
11:33:00.662 INFO - Executing: [new session: Capabilities [{count=1, browserName
=chrome}]])
11:33:00.678 INFO - Creating a new session for Capabilities [{count=1, browserNa
me=chrome}]
Starting ChromeDriver 2.26.436362 (5476ec6bf7ccbada1734a0cdec7d570bb042aa30) on
port 16569
Only local connections are allowed.
11:33:02.223 INFO - Done: [new session: Capabilities [{count=1, browserName=chro
me}]]
11:33:02.235 INFO - Executing: [set script timeout: 500000])
11:33:02.241 INFO - Done: [set script timeout: 500000]
- 步骤定义文件内容
醇>
// protractor.conf.js
exports.config = {
seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
getPageTimeout: 60000,
allScriptsTimeout: 500000,
framework: 'custom',
// path relative to the current config file
frameworkPath: require.resolve('protractor-cucumber-framework'),
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to this directory.
specs: [
'features/*.feature'
],
baseURL: 'http://localhost:8080/',
cucumberOpts: {
require: 'features/step_definitions/my_step_definitions.js',
tags: false,
format: 'pretty',
profile: false,
'no-source': true
}
};
版本:
请帮助解决这个问题,我不知道如何解决这个问题。