selenium-rc

Best Practices for modularizing Selenium RC test scripts

。_饼干妹妹 提交于 2019-12-09 06:24:40
问题 I am creating Selenium RC test scripts in Visual Studio (C#). I am struggling with re-factoring the tests; all my tests are in a single file. I would appreciate any input and/or pointers to websites, books, etc. to learn about modularizing the tests. I have to run the same tests on different sites (same application but configured differently for different clients and logins) which are 95% same. Would anybody like to provide some good examples or best practices to do this? Thanks! 回答1: Best

Firefox bug with Selenium - Can't access dead object

心已入冬 提交于 2019-12-08 15:27:23
问题 I've tried to run my tests with Selenium 2 and Firefox 19. One of this tests causes an error "ERROR: Command execution failure. The error message is: can't access dead object". I'm reading about it, it seems like a bug in newest Firefox's versions. Lot of people have the same issue, but I've not found anything really clear. Any heroe can help us? Maybe we just need to change something in "about:config"? Regards 回答1: I was desperate about the same Problem and didn't find any solution although

Difference between selenium.selectFrame() and selenium.selectWindow()

僤鯓⒐⒋嵵緔 提交于 2019-12-08 13:52:27
问题 I've been struggling with the difference between the following commands, used while accessing widgets contained within iframes: selenium.selectFrame("widget0"); selenium.selectWindow("name=widget0"); In the past (prior to IDE v1.0.12), I have been using these interchangeably, preferring the former over the latter in most cases. However, with 1.0.12, swapping them out after recording does not work. In what cases would each one be used? Thanks. 回答1: selectFrame is the API of selenium to select

Selenium clicks not working with GWT

烈酒焚心 提交于 2019-12-08 08:20:58
问题 I run GWT OBF (thus this isn't the problem), but when I use Selenium (tried both IDE and RC) my clicks don't get recorded. The component I'm trying to click is a <div> , but nothing happens. For instance, in IDE I am sometimes (very seldom, like one in 50 clicks) able to register a click on different tabs (contained in <div> ), but never able to replay the test with any resulting click. Help!?! 回答1: This is a duplicate of Selenium Testing of GWT 2.0 but here is my answer again. Unfortunately

How do we get the URL of the current page in Selenium RC for C#?

我的梦境 提交于 2019-12-08 03:15:36
问题 I am trying to get the URL of the current page in Selenium RC for C#. I don't want to get the href attribute of an icon, as I want to use it to compare it with the URL, the icon redirects you too. 回答1: say you have defined it as IWebDriver wb; wb = New FirefoxDriver(); wb.Navigate.GoToUrl("http://gogoel.com"); then to get current url use String ptr=wb.Url; 来源: https://stackoverflow.com/questions/29569699/how-do-we-get-the-url-of-the-current-page-in-selenium-rc-for-c

Hudson + Selenium plugin - Getting HTTP error 403 when running tests

99封情书 提交于 2019-12-08 02:34:11
问题 I am trying to test my application using Selenium tool via the Hudson plugin (the one called sleniumhq plugin). As a proof of concept I decided to make a very simple test targetting google, the test is the one below: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1 /DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://selenium-ide.openqa.org/profiles/test

Selenium RC test (PHPUnit)

旧街凉风 提交于 2019-12-07 22:37:52
问题 Using, Centos, Apache, PHPUnit, Selenium RC, I was trying to test selenium RC which is running in one of my server. java -jar selenium-server-standalone-2.4.0.jar Initially i got error of firefox creating profile and it doesnot load anything up and gives error. Secondly i tried to do with given profile location. java -jar selenium-server-standalone-2.4.0.jar -firefoxProfileTemplate "/root/.mozilla/firefox/" & still it shows error ERROR - Failed to start new browser session, shutdown browser

Using Selenium to 'click' on non-input or non-control elements

送分小仙女□ 提交于 2019-12-07 17:49:06
问题 Has anyone been successful with getting Selenium to issue a mouse click on an element which is not associated with input, i.e. plain text ? I have tried using click() and click_at() methods, as well as fire_event(locator, event), where 'event' is 'onclick', or by using combination of 'onmousedown' and 'onmouseup' events. I have also tried preceding these events with an 'onmouseover' event. In my app, clicking on this 'plain text' triggers a call to a flash.swf routine. Thanks. 回答1: Have you

Don't stop on HTTP error 403

拥有回忆 提交于 2019-12-07 16:41:09
问题 In one of my Selenium test cases, I try to ensure that certain pages can't be accessed. Instead, HTTP return code 403 should be given. However, here Selenium terminates test execution with the following exception: com.thoughtworks.selenium.SeleniumException: XHR ERROR: URL = http://user:password@www.example.com/admin Response_Code = 403 Error_Message = Forbidden Any way to work around that? 回答1: Seems like I have to answer the question myself... I now surround the "open" call with a try..

Selenium RC architecture and Selenium WebDriver architecture differences

折月煮酒 提交于 2019-12-07 16:39:15
问题 Hi I want differences between architectures of selenium RC and webDriver. I read lot of functional differences but did not find anything for architecture differences. If anyone can send/post links of differences that will really appriciate. Thanks in advance 回答1: The difference is quite substantial. Selenium RC works only using JavaScript for its every command. That means that everything you write is eventually translated into Javascript and run in the browser. This approach has several pros