npm install -g protractor
npm install
/**
* Created by Administrator on 2015/4/24.
*/
exports.config = {
directConnect: true,
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome'
},
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['test.js'],
// Options to be passed to Jasmine-node.
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000
}
};
/**
* Created by Administrator on 2015/4/24.
*/
describe('angularjs homepage', function () {
it('should greet the named user', function () {
browser.get('http://localhost:63342/protractor/Index.html');
element(by.id('userName')).sendKeys(' Sparrow');
browser.sleep(4000);
});
});
<!DOCTYPE html>
<html data-ng-app="protractor">
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div data-ng-controller="myAppController">
{{userName}}
<input id="userName" data-ng-model="userName" />
</div>
</body>
<script src="lib/angular.min.js"></script>
<script>
var app = angular.module('protractor',[]);
app.controller('myAppController',['$scope',function($scope){
$scope.userName = 'Jackey';
}]);
</script>
</html>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有