dalekjs / dalek-browser-ie

[unmaintained] Internet Explorer Browser bindings for DalekJS
MIT License
9 stars 6 forks source link

javascript problem #18

Open ghost opened 9 years ago

ghost commented 9 years ago

i have a problem with dalekjs when i want to run a js code into a function .execute , only with ie because with phantom and chrome it works. this is an example:

test.open('http:**') .waitFor(function () { return window.document.querySelectorAll('.numItemsFil').length != 0;

                            })
        .execute(function(){

        var si = 0;
        var reg = new RegExp('^[0-9]');
        var elem =  window.document.getElementsByClassName('numItemsFil')[0].innerText;
        if(elem.match(reg)){ si =1;}
        this.assert.ok(si == 1);
        })
        .done();