selenium-rc

Selenium and :hover css

微笑、不失礼 提交于 2019-11-27 06:49:29
问题 Using selenium-rc and the java client, I want to test a menu which opens when the user moves the mouse over it. It closes when the mouse leaves the menu. This is done using :hover css, without any javascript. In selenium, there are many methods for mouse actions, but none of them seems to trigger any css :hover style to be used. Google shows that I am not alone with this problem, but there has not be a solution. Some folks comment that you had to add some javascript code; however, in selenium

WebDriver Chrome Browser: Avoid 'Do you want chrome to save your password' pop up

北城以北 提交于 2019-11-27 06:37:57
问题 Every time my webdriver tests login into the application, 'Do you want chrome to save your password' pop up appears.. Is there a way to avoid this?? Please help. Thanks, Mike 回答1: You need to configure the following chrome driver options: chromeOptions: { prefs: { 'credentials_enable_service': false, 'profile': { 'password_manager_enabled': false } } } 回答2: I'm using Python, and this worked for me: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome

what's the relationship between Selenium RC and WebDriver?

瘦欲@ 提交于 2019-11-27 04:04:24
问题 I can see that since selenium 2.0, WebDriver and Selenium RC are packaged together for download. Now I primarily use WebDriver, but can I bring in Selenium RC in my testing scripts from now and then? Is there anything that Selenium RC is capable of but WebDriver is not, or vice versa? 回答1: You should probably start your research here (though you may have already gone over this): http://seleniumhq.org/docs/03_webdriver.html I'll assume you're contrasting Selenium-RC to WebDriver, Selenium-IDE

How to send an http RequestHeader using Selenium 2?

泄露秘密 提交于 2019-11-27 03:05:41
问题 I needed to send an Http request with a few modified headers. After several hours trying to find an equivalent method to that of Selenium RC Selenium.addCustomRequestHeader for Selenium 2, I gave up and used JavaScript for my purposes. I have expected this to be a lot easier! Does someone know a better method? This is what I have done: javascript.js var test = { "sendHttpHeaders": function(dst, header1Name, header1Val, header2Name, header2Val) { var http = new XMLHttpRequest(); http.open("GET

“IEDriverServer does not exist” error during running Selenium test with C# in Windows 7

北城余情 提交于 2019-11-27 01:16:52
问题 I'm working on Automation framework using WebDriver with C#. Its working fine with Firefox but not with IE. I am getting the following error: IEDriverServer.exe does not exist-The file c:\users\administrator\documents\visual studio 2010\projects\TestProject1\TestProject1\bin\Debug\IEDriverServer.exe does not exist. The driver can be downloaded at http://code.google.com/p/selenium/downloads/list I am using IE 9 and Windows 7. IWebDriver driver = new InternetExplorerDriver(); driver.Navigate()

How to continue execution when Assertion is failed

妖精的绣舞 提交于 2019-11-26 22:58:40
I am using Selenium RC using Java with eclipse and TestNG framework. I have the following code snippet: assertTrue(selenium.isTextPresent("Please enter Email ID")); assertTrue(selenium.isTextPresent("Please enter Password")); First assertion was failed and execution was stopped. But I want to continue the further snippet of code. Selenium IDE uses verify to perform a soft assertion, meaning that the test will continue even if the check fails and either report the failures at the end of the test or on the event of a hard assertion. With TestNG it is possible to have these soft assertions by

Clicking at coordinates without identifying element

六眼飞鱼酱① 提交于 2019-11-26 22:22:55
问题 As part of my Selenium test for a login function, I would like to click a button by identifying its coordinates and instructing Selenium to click at those coordinates. This would be done without identifying the element itself (via id, xpath, etc). I understand there are other more efficient ways to run a click command, but I'm looking to specifically use this approach to best match the user experience. Thanks. 回答1: Selenium won't let you do this. 回答2: There is a way to do this. Using the

How can automation testing on Silverlight using Selenium be done?

不问归期 提交于 2019-11-26 22:02:02
问题 I am looking for a way by which I can automate my application build on Silverlight. I need to use Selenium as required, can anyone tell a process or any good tutorial by which I can achieve what I require. Thanks in advance. 回答1: Take a look at: http://code.google.com/p/silverlight-selenium/ and Silverlight testing: Watin vs Selenium comparison Also bear in mind that Silverlight's future looks uncertain: http://www.hightechnewstoday.com/apr-2011-high-tech-news-archives/74-apr-13-2011-high

Load an external js file containing useful test functions in selenium

我的未来我决定 提交于 2019-11-26 21:43:54
问题 The runScript command in selenium is really useful, and I'm using it to total values in a table and then store the value like this <tr> <td>runScript</td> <td>var cumulative = 0.0; $('table.quote-review-group-component').eq(0).find('tr').each( function( i,el ){var singleStackTotal = $(el).find('td').eq(4).html();if( singleStackTotal ){cumulative += parseFloat( singleStackTotal.substring(1) );} }); cumulative = cumulative.toFixed(2)</td> <td></td> </tr> <tr> <td>storeEval</td> <td>selenium

Pass command line arguments to JUnit test case being run programmatically

送分小仙女□ 提交于 2019-11-26 18:19:51
问题 I am attempting to run a JUnit Test from a Java Class with: JUnitCore core = new JUnitCore(); core.addListener(new RunListener()); core.run(classToRun); Problem is my JUnit test requires a database connection that is currently hardcoded in the JUnit test itself. What I am looking for is a way to run the JUnit test programmatically(above) but pass a database connection to it that I create in my Java Class that runs the test, and not hardcoded within the JUnit class. Basically something like