- Rubycurse
- Posts : 1
Join date : 2012-11-26
Typing in text on remote machine does not work, locally it does.
Mon Nov 26, 2012 5:30 pm
Hi!
I am using Selenium WebDriver to test a web application both locally and remotely on a virtual machine running on an external server. For both cases I use the same methods for interaction with the browser. In my case I use Firefox and IE8 locally and IE8 on the remote server.
The problem that occurs is when I run the following method:
public void type(String element, String value) {
selenium.keyPress(element, value);
}
I tried modifying this method using selenium.type, selenium.typeKeys, selenium.keyDown and selenium.keyUp but nothing worked. In some cases I crashed my locally running tests with this, too. On the remote Server there runs a selenium server to which I refer to via the following command:
String url = properties.getProperty(SELENIUM_APPLICATION_PROTOCOL) + "://" + properties.getProperty(SELENIUM_APPLICATION_ADDRESS);
Selenium selenium = new DefaultSelenium(properties.getProperty(SELENIUM_SERVER_ADDRESS), 4444, properties.getProperty(BROWSER_IE), url);
My WebDriver is instantiated via
WebDriver driver = new FirefoxDriver();
Selenium selenium = new WebDriverBackedSelenium(driver, url);
The concrete test case when the method mentioned above is crashing resp. not working properly is when I type in values to instantiate a new element via a html-form. When I try to save the entered data the browser deletes the inputted values because it fires the wrong event.
Can anybody help me solving this problem?
Thanks in advance
Tobias
I am using Selenium WebDriver to test a web application both locally and remotely on a virtual machine running on an external server. For both cases I use the same methods for interaction with the browser. In my case I use Firefox and IE8 locally and IE8 on the remote server.
The problem that occurs is when I run the following method:
public void type(String element, String value) {
selenium.keyPress(element, value);
}
I tried modifying this method using selenium.type, selenium.typeKeys, selenium.keyDown and selenium.keyUp but nothing worked. In some cases I crashed my locally running tests with this, too. On the remote Server there runs a selenium server to which I refer to via the following command:
String url = properties.getProperty(SELENIUM_APPLICATION_PROTOCOL) + "://" + properties.getProperty(SELENIUM_APPLICATION_ADDRESS);
Selenium selenium = new DefaultSelenium(properties.getProperty(SELENIUM_SERVER_ADDRESS), 4444, properties.getProperty(BROWSER_IE), url);
My WebDriver is instantiated via
WebDriver driver = new FirefoxDriver();
Selenium selenium = new WebDriverBackedSelenium(driver, url);
The concrete test case when the method mentioned above is crashing resp. not working properly is when I type in values to instantiate a new element via a html-form. When I try to save the entered data the browser deletes the inputted values because it fires the wrong event.
Can anybody help me solving this problem?
Thanks in advance
Tobias
- Using Java, how to connect a Remote machine and then ssh to another machine from the already connected one ?
- What are the possible solution to trigger IE11 on Remote Machine in Selenium
- How to get the tittle of a object (not window), bcz title holds the full text but inner text holds only 25 char of text (in RC and Webdriver)
- Selenium Automatically clears the text entered in text box-Dynamic Web Table(dgrid)
- Selenium WebDriver - Scripts are not running through Jenkins where as working fine locally - Mac OS
Permissions in this forum:
You cannot reply to topics in this forum