selenium-rc

Using selenium in order to read emails on gmail

不羁的心 提交于 2019-12-06 08:31:23
问题 I'm using selenium-rc and I'm trying to click on a specific email on gmail in order to get into the email page. More specifically: on the gmail inbox, click on a email with a specific subject. I can't find the correct xpath (none of the tags in the email part are links). Ideas? 回答1: This XPath should do the trick: //div[@class = 'y6']/span[contains(., 'subject_here')] ... provided that you've first changed to the canvas_frame frame. Otherwise, it's unlikely it'll work at all. If you're not

Controlling a web browser using Excel VBA

寵の児 提交于 2019-12-06 04:04:36
I have been assigned the task of automating a web based task ( for a HTTPS website). The users currently are filling in the Excel sheet with the data, they now want to automate excel in such a way that it directly controls the browser and fills in the data. I found the iMacros Scripting edition as a possible solution for doing this, I wanted to know if there are any other similar tools which can be used for controlling the browser and filling in data. I also had a look at the Selenium Client Driver, but I am not sure on how to use it in Excel VBA. Any help would be appreciated. Thanks, You can

Controlling a web browser using Excel VBA

倖福魔咒の 提交于 2019-12-06 04:02:46
I have been assigned the task of automating a web based task ( for a HTTPS website). The users currently are filling in the Excel sheet with the data, they now want to automate excel in such a way that it directly controls the browser and fills in the data. I found the iMacros Scripting edition as a possible solution for doing this, I wanted to know if there are any other similar tools which can be used for controlling the browser and filling in data. I also had a look at the Selenium Client Driver, but I am not sure on how to use it in Excel VBA. Any help would be appreciated. Thanks, You can

Got “you are using unsupported command-line flag: --disable-web-security. Stability and security will suffer” error

元气小坏坏 提交于 2019-12-06 03:52:21
问题 I got this below error while using Selenium RC for Google Chrome you are using unsupported command-line flag: --disable-web-security. Stability and security will suffer. I don't know whats the issue with chrome. 回答1: Reference code for flag --disable-web-security // Don't enforce the same-origin policy. (Used by people testing their sites.) const char kDisableWebSecurity[] = "disable-web-security"; It disallows cross scripting code, what are you doing on selenium RC? 回答2: In feb 2013, someone

Press Enter Key in Selenium RC with C#

烂漫一生 提交于 2019-12-06 02:36:39
问题 How to press Enter using Selenium RC using C#? I am working with a SearchBox using Selenium . In which I have to type some name and I have to press Enter to search. There is no Submit button. So, I must use Enter . I tried something like this selenium.KeyPress("quicksearchtextcriteria", "13"); But doesn't work. Please Help. Note: I made a collection of possible ways to do this. See here: press enter key in selenium 回答1: This can be achieved by Keys, and Enter. Example in Java as I don't know

Selenium in -browserSessionReuse mode launchs a new browser

孤人 提交于 2019-12-06 01:54:10
I'm trying the -browserSessionReuse Selenium mode to speed up my tests but i've noticed a strange behaviour. The purpose of this mode is avoid the time wasted opening browsers between tests, and this is how it works. But not always, if i run tests continuously they are run in the same browser, correct. But if between each test run pass some minutes, it will forget it has an already opened browser and it opens a new one. I suppose there is a timeout to discard the "old" browser, but i don't understand why. Is there anyway to avoid this issue? (tested with Selenium1 and Selenium2) Thanks in

how can I add code reuse to my Selenium tests?

时光毁灭记忆、已成空白 提交于 2019-12-05 23:10:58
Here's the situation that I'm working with: Build tests in Selenium Get all the tests running correctly (in Firefox) Export all the tests to MSTest (so that each test can be run in IE, Chrome and FF) If any test needs to be modified, do that editing in Selenium IDE So it's a very one-way workflow. However, I'd now like to do a bit more automation. For instance, I'd like every test to run under each of two accounts. I'm getting into a maintenance issue. If I have 6 tests that I want to run under two accounts, suddenly I'd need 12 tests in the Selenium IDE tests. That's too much editing. But a

Don't stop on HTTP error 403

时光怂恿深爱的人放手 提交于 2019-12-05 21:33:22
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? Seems like I have to answer the question myself... I now surround the "open" call with a try...catch block. There, I parse the exception message if it contains the 403 code and XHR ERROR. Seems to me not

How to run Selenium Java tests with TestNG programmatically?

删除回忆录丶 提交于 2019-12-05 21:31:10
问题 I am using Selenium RC with Java using TestNG as Test Framework. I'm using Eclipse as IDE. I want to invoke TestNG from my own program very easily. How can I do that? 回答1: TheStijn gives a few good directions, although TestMethodWorker() is internal so you shouldn't use it. Based on the question, I'm not even sure the original poster is trying to launch TestNG in a separate process, so the API documentation might be what you're looking for: http://testng.org/doc/documentation-main.html

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

喜你入骨 提交于 2019-12-05 20:29:49
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. Have you tried adapting a Mouse Listener? In case you are extending Selenium using Java, here is a quick tutorial.