Question

i am using simpletest as my php unit test framework.

i put all my test cases into a single all_tests.php file

however, because of the tendency of our developers to use firefox to run the all_tests.php, we tend to miss out on fail cases that are browser specific, especially ie7.

is there a way that when somebody browse our all_tests.php in firefox, it will trigger automatically an ie window to open for the same page?

Was it helpful?

Solution

write command batch file that opens all the windows.

@echo off
set URL="http://example.com/"
cd "C:\Program Files\Internet Explorer"
iexplore %URL%
cd "C:\Program Files\Mozilla Firefox"
firefox %URL%

OTHER TIPS

There is a way, but the browser will ask for permition before doing it.

You can use this script to open Internet Explorer (but don't forget it will only work if user accepts the security warning)

function runExeOnMozilla(path/*as string*/,args/*as array*/) {
    try{
        netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect');
        var file = Components.classes["@mozilla.org/file/local;1"]
                    .createInstance(Components.interfaces.nsILocalFile);
            file.initWithPath(path);
        var process = Components.classes["@mozilla.org/process/util;1"]
                    .createInstance(Components.interfaces.nsIProcess);
            process.init(file);
            process.run(false, args, args.length);
    } catch(err){
        alert('access denied');
    }
}

Aside from possibly making (or using an existing) addon, i would say no. It would pose a serious security threat.

Not that I'm aware of - it would be something of a security hole if a web page could run arbitrary programs off your harddrive.

You could maybe write a simple Firefox extension to do it, or, if you are on Windows, use (or modify) IETab somehow.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top