Tag: phantomjs nightwatch.js

基本testing在夜视phantomjs浏览器上失败

我正在使用selenium服务器,node.js和phantomjsselenium的夜间守夜。 我使用phantomjs只是为了无头浏览器(当它运行testing时selenium并不打开浏览器)。 当我使用firefox作为浏览器时,我的基本testing通过,但是当我使用phantomjs浏览器时失败。 我设置基本的谷歌testing: module.exports = { 'Demo test Google' : function (browser) { browser .url('http://www.google.com') .waitForElementVisible('body', 1000) .setValue('input[type=text]', 'nightwatch') .waitForElementVisible('button[name=btnG]', 1000) .click('button[name=btnG]') .pause(1000) .assert.containsText('#main', 'Night Watch') .end(); } }; 并设置phantomjs服务器。 这是我的nightwatch.json: { "src_folders" : ["tests"], "output_folder" : "reports", "custom_commands_path" : "", "custom_assertions_path" : "", "page_objects_path" : "", "globals_path" : "", "selenium" : { "start_process" […]