开发者

Automated web testing using shell script for Internet Explorer and Firefox

开发者 https://www.devze.com 2023-02-04 04:14 出处:网络
开发者_运维问答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 s
开发者_运维问答

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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消