selenium-rc

java.lang.ClassCastException: In Web-DriverWait when using PageFactory with POM

元气小坏坏 提交于 2019-12-12 02:24:47
问题 I am using Page factory model in selenium to initialise the web elements. I have wait operations in my code, while passing the web element to my wait operations, it throws "ClassCastException". I am not able to find solution, any leads will be great. Please suggest me some ways to cast the Page factory' object to WebElement' object. @FindBy(how = How.XPATH, using = "//*[@id='menu-posts']/div[3]/div/ul/li[3]/a") public WebElement categories; public void menus() { try { loginTest(); menuPosts

Timed out after 30000ms when I try to go next page by clicking Submit button [duplicate]

北战南征 提交于 2019-12-11 23:41:31
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: Timed out after 30000ms when I try to go next page by clicking Submit button I am using Selenium RC by java.Fill up necessary data on 1st page-->Click Submit button to go next page. My code is: selenium.click("Submit"); selenium.waitForPageToLoad("30000"); After clicking Submit button I found the error: com.thoughtworks.selenium.SeleniumException: Timed out after 30000ms Can anybody pls help me? 回答1: This

selenium RC and Flow control

怎甘沉沦 提交于 2019-12-11 19:53:47
问题 Currently I am working on selenium IDE, now I need to switch to selenium RC. I have downloaded selenium server.But I really don't know how to proceed further. Even I am not able to start server from command prompt. I have used C:\Selenium RC\selenium-server\jave -jar selenium-server.jar, but it struck in between and not proceeding further.. I am looking for language java or PHP. Let me know how should I move further for successful execution of scripts by using selenium RC 回答1: First of all:

Selenium RC testing with Maven

不问归期 提交于 2019-12-11 12:15:43
问题 I'm trying to run a series of selenium tests using maven and I get this error: Running com.myapp.web.selenium.MySeleniumTest WARN [SocketListener0-1] HttpConnection - POST /selenium-server/driver/ HTTP/1.1 java.lang.RuntimeException: Firefox refused shutdown while preparing a profile at org.openqa.selenium.server.browserlaunchers.FirefoxCustomProfileLauncher.waitForFullProfileToBeCreated(FirefoxCustomProfileLauncher.java:27 7) at org.openqa.selenium.server.browserlaunchers

Selenium: handling multiple inputs with same xpath

纵然是瞬间 提交于 2019-12-11 12:04:52
问题 I am testing a website where the user has an option to change the input fields to Textbox and Dropdown. Whether the user changes it to dropdown or textbox, the xpath for the input field is the same. So, I am not sure how to write the test steps for this situation. I would like to do something like: if (dropdown present) { Selenium.Select("dropdown xpath", "option"); } else if (textbox present) { Selenium.Type("texbox xpath", "option"); } Can anyone please help me out? Is there a way in

Selenium, PHP Unit and Firefox on Ubuntu EC2

一曲冷凌霜 提交于 2019-12-11 10:25:44
问题 I am attempting to get PHPUnit tests running with Selenium. I start up selenium: java -jar selenium-server-standalone-2.32.0.jar & Run my tests: phpunit --verbose suite/TestSuite.php ... and this is where things tend to go wrong on the Selenium RC side. When Selenium attempts to "Preparing Firefox profile..." it errors out due to the following: ERROR - Failed to start new browser session, shutdown browser and clear all session data java.lang.RuntimeException: Timed out waiting for profile to

i18n testing using selenium

点点圈 提交于 2019-12-11 07:44:50
问题 Have any one used selenium for testing i18n ! Does Selenium provide any kind of I18N/L10N support? Is it possible to verify text based on message keys from a resource file? What about checking numbers and dates that might have a different format because of L10N? 回答1: I am also interested in the correct approach for this issue. Where I work, we usually use the ids to verify certain page or field. But, sometimes you might need to verify some text, which could be using i18n. Try the following:

How to use the same selenium session with different test cases?

允我心安 提交于 2019-12-11 06:38:35
问题 I'm using JUnit and Selenium. I would like to log in once to a web page, after run I run two test cases, without opening a new browser/session. If I do the "logging in" in setUp() method, then this called at every time before the test cases. How can I use only one setUp() method for all of my test cases? 回答1: I think it could be achieved in the following manner package com.java; import org.junit.After; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; import

How to close a tab and open a new tab using Selenium RC

蓝咒 提交于 2019-12-11 06:36:14
问题 I'm working on selenium RC java. In my test case, I have to close a tab and then open a new tab in the same test case. Can anyone please tell me how to do it? 回答1: Have you tried using Selenium IDE to record these scenarios? That's what I would try first. Alternatively, try firing a Ctrl+T event to open a new tab: selenium.keyDownNative("17"); selenium.keyPressNative("84"); selenium.keyUpNative("17"); and Ctrl+W to close the tab: selenium.keyDownNative("17"); selenium.keyPressNative("87");

Selenium RC: “waiting for window 'null' local frame 'null'”

痴心易碎 提交于 2019-12-11 04:01:38
问题 I am totally at a loss here, trying to run a minimal Selenium RC style test. The issue I'm experiencing has been described by a lot of users on the web but none of the widely varying solutions solved the problem in my case. What happens is that Firefox will open, but with what looks like an empty profile to me, because it opens the "Welcome to Firefox!" page. Apart from that, nothing happens in the browser and in the Selenium server log I find this: DEBUG [12] org.openqa.selenium.server