简体   繁体   中英

Selenium webdriver IE9 event not firing

I am using nodejs, Soda with selenium

I am hitting problems trying to get the javascript to fire events like on entry of data. Script can't even get through the creation of client flow on IE. Only worried about IE 9+ btw.

Am I missing anything ? This works fine in latest FF. Below posting sample code using for FF

var soda = require('soda');
var assert = require('assert');
var browser = soda.createClient({
  url: 'http://192.168.12.1/', // localhost website
  port:5555,
  host:'192.168.1.3', //grid ip
  browser: 'firefox',
  browserTimeout:5
});

var testname = 'Nits' + parseInt(Math.random() * 100000000); //create unique name for new person.
console.log('randome name: ' + testname);

browser 
    .chain
    .session()  
    .setSpeed(speed)
    .setTimeout(20000)
    .open('/')
    .and(login('dev@dev.com', 'x1212GQtpS'))
    .and(killClient(killAtEnd))
    .end(function(err){
        console.log('done');
        if(err){
            console.log(err);
        }else{
            console.log("We're Good");
        }
        if (closeAtEnd){
            browser.testComplete(function() {
                console.log('killing browser');
            });
        }
    });

function login(user, pass) {
  return function(browser) {
    browser
    .click('css=a#loginButton')
    .type('css=input.input-medium.email',user)
    .type('css=input.input.pwd',pass)
    .clickAndWait('css=a.btn.login')
    .assertTextPresent('Clients',function(){ console.log('logged in ok')})
  }
}

Can you be more specific about exactly where the script stops, fails, or throws an error? I suspect that IE can't handle the way you put your css selector together (ie the classname combinators such as 'input.input.pwd' ). I would recommend trying a different selector or rewrite/simplify your existing selector until you get it working.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM