Get help with testing, discuss unit testing strategies etc.


Post by Erik2012 »

Hello,

I would like to use the selenium webdriver for my tests. I use the logger log4javascript in my application. In firefox all works fine. PhantomJS passes all tests and chrome do so, too. Only Internet Explorer fails a test, telling that console is undefined. console is a variable which I use to log messages like that, console.log('My Log');. When I run the tests in Internet Explorer without the test environment the logger works and logs messages to the user in the developer console of the IE. Do you have any idea whats wrong?
To Safari, what do you mean in your changelog with: "Selenium Safari driver requires compilation from source"? I found only the building of the selenium driver for safari with java. How can I integrate this to siesta after I build this?

Best reguards
Erik

Post by nickolay »

Hi,

In IE, when developer console is closed, "console" is not defined - I'd recommend to create your own log method, something like: "function log() { if (window.console) { ... } }

As about Safari - see this page: https://code.google.com/p/selenium/wiki/SafariDriver it describes that you need to compile a Safari extension from Selenium sources, then sign it, and add to browser.

Post by Erik2012 »

Hello Nickolay,

your advice was like gold. Now everything works with the console.

Thank you

Post Reply