1
Ich habe eine leere Seite mit einem einzigen Auswahlfeld, die IP-Adresse als Werte enthält und ich möchte einen einzelnen Wert mit zombine.js einer von ihnen auswählen.zombie.js Wie wähle ich aus einem Dropdown
this.browser.fill('select', '223.255.252.246');
Dies scheitert^
aber dies gelingt:
this.browser.assert.element('select')
Was bin ich? Ist es nicht "füllen"?
Hier ist mein Test
// force the test environment to 'test'
process.env.NODE_ENV = 'test';
// get the application server module
var app = require('../../app');
var http = require('http');
var Browser = require('zombie');
var assert = require('assert');
describe('contact page', function() {
before(function(done) {
this.server = http.createServer(app).listen(3000);// initialize the browser using the same port as the test application
this.browser = new Browser({ site: 'http://localhost:3000' });
this.browser.visit('/', done);
});
it('should load the homepage successfully', function(){
assert.ok(this.browser.success);
});
it('shows a dropdown', function(){
this.browser.assert.element('select')
});
it('selects china, and clicks "start"', function(){
this.browser.fill('select', '223.255.252.246');
});
// ...
after(function(done) {
this.server.close(done);
});
});