在Internet Explorer中安装Selenium IDE

编程入门 行业动态 更新时间:2024-10-10 01:20:01
本文介绍了在Internet Explorer中安装Selenium IDE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

您好 我想知道是否可以在Internet Explorer中安装selenium Ide 以及是否无法安装在IE中如何在IE中执行测试用例 任何帮助都将被估价最多 谢谢 Abinav Shankar

Hi I want to know whether it is possible to Install selenium Ide in Internet explorer and also if it cannot be installed in IE how can the test cases be executed in IE any help will be valued the most Thanks Abinav Shankar

推荐答案

入门与Selenium [ ^ ] 这是我的一个小小的努力,一篇关于硒开始的文章,希望你能从中得到一些想法。 谢谢。 :) Getting started with Selenium[^] This a small effort by me, an article on getting started with selenium, hope you get some idea from this. Thanks. :)

根据 Selenium [ ^ ]它是Firefox的扩展名;所以我猜答案是不。 According to Selenium[^] it is a Firefox extension; so I guess the answer is "No".

回答问题的后半部分: 要让Selenium使用IE测试网站,你首先需要告诉Selenium IDE以您的首选语言为您生成代码,然后您可以通过如下所示的小调整修改该代码。之后,您可以使用Selenium RC和NUnit的综合优势来运行它。 如果您的首选语言是C#,则public void SetupTest()中生成的代码的第一行看起来有点像这样: selenium = new DefaultSelenium(localhost,4444,* firefox,www.SiteYouAreTesting/); 如果用* iexplore替换上面一行中的* firefox,测试用例将使用Internet Explorer而不是FireFox运行。 有关如何使用Selenium IDE,Selenium RC和NUnit构建和运行自动化测试的详细说明,请参阅:http://thetestingblog/2009/09/10/selenium-rc-in-c-using-nunit-an -end-to-end-example /#comment-645 我不同意上述博客文章的一点是作者建议删除try / catch在生成的[Test]方法中阻止。相反,我建议你改变这个: verificationErrors.Append(e.Message); ......对此: verificationErrors。附加(e.ToString()); 如果你没有进行任何更改,那么实际失败的测试将被列为传递,因为e.Message不幸地作为空字符串()出现。另一方面,e.ToString()正确地有一个描述异常细节的非空字符串。 除了FireFox和IE之外的其他浏览器怎么样?我发现的其他浏览器字符串的最完整的讨论在这里:http://seleniumhq/docs/05_selenium_rc.html 请参阅处理HTTPS和安全弹出窗口下的部分。另请参阅支持其他浏览器和浏览器配置下的部分。 HTH, 拉里 To answer the 2nd half of your question: To get Selenium to test a web site using IE, you need to first tell the Selenium IDE to generate code for you in your preferred language, and then you can modify that code a with a small tweak like the one shown below. After that you can run it using the combined benefits of Selenium RC and NUnit. If your preferred language is C#, the first line of generated code in public void SetupTest() will look a little like this: selenium = new DefaultSelenium("localhost", 4444, "*firefox", "www.SiteYouAreTesting/"); If you replace "*firefox" in the line above with "*iexplore" the test case will run with Internet Explorer instead of FireFox. For a thorough description of how to use Selenium IDE, Selenium RC, and NUnit to build and run automated tests, see: thetestingblog/2009/09/10/selenium-rc-in-c-using-nunit-an-end-to-end-example/#comment-645 The one point where I disagree with the above blog posting is where the author recommends removing a try/catch block in the generated [Test] method. Instead, I recommend that you change this: verificationErrors.Append(e.Message); ... to this: verificationErrors.Append(e.ToString()); If you don't make either change then tests that actually fail will be listed as passing because e.Message unfortunately comes out as the empty string (""). On the other hand, e.ToString() correctly has a non-empty string describing the exception details. What about browsers other than FireFox and IE? The most complete discussions of other browser strings I have found are here: seleniumhq/docs/05_selenium_rc.html See the section immediately under, "Handling HTTPS and Security Popups". See also the section under "Supporting Additional Browsers and Browser Configurations". HTH, Larry

更多推荐

在Internet Explorer中安装Selenium IDE

本文发布于:2023-11-27 18:00:20,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1639028.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Explorer   Internet   IDE   Selenium

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!