Pergunta

I know I should be using other tools (like Selenium) for automated web tests but I have to use shell script. My problem is I need to open URLs in multiple IE and Firefox tabs. This is straight forward in Firefox but there doesn't seem to be any command line option to do this in IE. I need to be able to open one tab, wait, open another tab. Does anyone have any suggestions on how this could be achieved?

Thanks.

Foi útil?

Solução 2

This can be done on Windows using JScript, basically you use the wscript (Bundled with IE) program to execute a JScript file that opens two instances of IE and then calls the method to open urls on these instance objects.

Another way of doing this is to dynamically write out a HTML file containing JavaScript that opens a URL then waits and then opens another URL etc.. and then when executing your browser of choice point it to the location of the HTML file. Example, iexplore.exe open_urls.html

Outras dicas

The link below might help as it also deals with opening URLs in new tabs. Based on the conversation, the key is letting enough time for the first instance to launch completely.

How to launch multiple Internet Explorer windows/tabs from batch file?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top