当前位置: 动力学知识库 > 问答 > 编程问答 >

Automated web testing using shell script for Internet Explorer and Firefox

问题描述:

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.

网友答案:

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?

网友答案:

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

分享给朋友:
您可能感兴趣的文章:
随机阅读: