selenium-rc

Is it possible to run Selenium scripts without having an X server running, too?

笑着哭i 提交于 2019-11-29 19:09:56
问题 I have a python script that uses selenium RC; specifically webdriver. I would love to have the script run as a post-commit hook, ideally through IE, Safari (if possible), Chrome & Firefox. But I'm not sure what I'd need to do, since every time I run it on my local machine, a browser pops up. I've heard of "saucelabs". Is it the best solution? 回答1: Yes, you need to have X server running because Selenium requires a running browser and browsers need some kind of X server in order to run.

Selenium: Is there any JS (JavaScript) code coverage tool which we can integrate with Selenium Server/RC

半世苍凉 提交于 2019-11-29 17:43:21
问题 Selenium: Is there any JS (JavaScript) code coverage tool which we can integrate with Selenium Server/RC Hi, I want to JS code coverage done by my Selenium Test Suite Is there any code coverage tool which can be integrated with my existing selenium rc framework?? 回答1: In theory, you can use any coverage tool that instruments JavaScript code to collect coverage data. For example, you can use JSCoverage either in proxy mode (for real-time instrumentation) or for static instrumentation to run

Selenium - Custom Firefox profile

拈花ヽ惹草 提交于 2019-11-29 15:50:24
I've setup a new firefox profile for use with Selenium (accepted certificate warnings for local QA site). But, I keep getting told the profile directory does not exist. This is the line from my batch file java -jar selenium-server.jar -firefoxProfileTemplate ~/"C:\Documents and Settings\dadams\Application Data\Mozilla\Firefox\Profiles\k39jzisz.SeleniumUser" but the message I get is: Firefox profile template doesn't exist: C:\Installs\selenium-remote-control-1.0. 3\selenium-server-1.0.3\~\C:\Documents and Settings\dadams\Application Data\Mozi lla\Firefox\Profiles\k39jzisz.SeleniumUser Can

How to automate username/password fill for firefox authentication popup using selenium IDE

本小妞迷上赌 提交于 2019-11-29 15:45:47
I got a selenium script that works, but when it is opened with selenium-rc it is in a new instanced which requires me to re-login. Is there a way to automate filling in the username/password for the "authentication required" window that pops up? I have tried the following but it doesn't work: http://username:password@site.com/ instead of http://site.com/ Any ideas other than calling another script like autohotkey? I ended up using AutoIT with a login script containing the following and it worked: WinWaitActive("Authentication Required") Send("Username") Send("{TAB}") Send("Password") Send("

How can I press the alert ok button programmatically?

随声附和 提交于 2019-11-29 15:32:42
How can I press the OK button in a JS alert programmatically? What I want to do: every time after the alert is created, the OK button is pressed. This is for a UI test using Selenium RC. Also, I have already checked: Click in OK button inside an Alert (Selenium IDE) . Edit: I had already used chooseOkOnNextConfirmation() and placed it before clicking the button the generated the alert. I also tried placing it after. Nothing worked! If you can actually see an alert dialog, then it can't be done. Selenium should handle it for you. But, as stated in Selenium documentation : Selenium tries to

Obvious reason to move from Selenium RC to Webdriver.?

房东的猫 提交于 2019-11-29 14:34:52
问题 From past 4 months am doing automation testing using Selenium RC . But recently i came to know that Selenium RC is deprecated. So many people suggested me to change to Selenium Webdriver . So, can anyboby tell me whats the problem with Selenium RC and how Webdriver is better than RC ?? Thank you. 回答1: Well, there are multiple reasons. Here are few in no particular order Webdriver offers a cleaner API than selenium RC. The most common example is you have selenium.type and selenium.typeKeys,

Selenium: How to select an option from a select menu?

[亡魂溺海] 提交于 2019-11-29 14:20:59
I am writing a Selenium test in PHP using the PHPUnit Selenium extension. I know how to type something into a text field: $this->type('fieldName', 'value'); But how do I select an option from a drop-down menu? To expand on the other (accurate) answers, you can select based on the label, value, id, or index of the options. From the official reference available at http://release.seleniumhq.org/selenium-core/1.0/reference.html : select(selectLocator, optionLocator) Arguments: selectLocator - an element locator identifying a drop-down menu optionLocator - an option locator (a label by default)

How to disable Flash in selenium remote webdriver

家住魔仙堡 提交于 2019-11-29 13:48:44
How do I disable the loading of flash objects when using Selenium Remote WebDriver. It will be helpful if I get a solution for the normal webdriver also. Since in most cases the Flash object is loaded by a JavaScript I have tried disabling the javascript on the webdriver and remote webdriver both, but it does not work. I tried to to disable the JavaScript by: WebDriver driver = new FirefoxDriver(); ((DesiredCapabilities) driver.getCapabilities()).setJavascriptEnabled(false); I also tried: DesiredCapabilities caps = new DesiredCapabilities(); caps.setJavascriptEnabled(false); WebDriver driver =

Testing flash applications on web using selenium [closed]

放肆的年华 提交于 2019-11-29 10:47:45
I want to test Microstrategy applications using any web testing tools. I figured out seleniun serves my purpose well. But microstrategy applications are deployed in flash formats. Please help me to guide how to test these flash applications is there any tool available? Can I use selenium only and how to use? Thanks in advance Selenium cannot interact with Flash objects. You can use FlashSelenium, which is quite old but seems to work: http://code.google.com/p/flash-selenium/ Or use Sikuli, Adobe's 'Genie' library, or Ranorex's library: http://sourceforge.net/adobe/genie/wiki/Home/ http://www

how to get attribute value using selenium and css

混江龙づ霸主 提交于 2019-11-29 10:46:52
I have the following HTML code: <a href="/search/?p=2&q=move&mt=1"> 2 </a> I would like to get what is contained in href, ie, I was looking for a command which would give me "/search/?p=2&q=move&mt=1" value for href. Could someone please help me with the respective command and css locator in selenium, for the above query? if I have something like: <a href="/search/?p=2&q=move&mt=1"> 2 </a> <a href="/search/?p=2&q=move&mt=2"> 3 </a> Out of these two if I was to get the attribute value for href whose text conatins '2', then how would my css locator synatx look like? If your HTML consists solely