Issues with Entering Text in Firefox Browser

212 views
Skip to first unread message

Alok Agarwal

unread,
Jan 4, 2013, 9:25:33 AM1/4/13
to seleniu...@googlegroups.com
Hi there,

I have issues with entering text in one of the input fields of my application only in Firefox. It works fine in Internet Explorer though.
There is no such issue with other input fields in Firfox and Internet Explorer.

Is there any other option/alternative to sendkeys in selenium webdriver using Java?

Thanks,
Alok

MMOpta

unread,
Jan 4, 2013, 9:34:18 AM1/4/13
to seleniu...@googlegroups.com
Please provide more information: for example the PAGE you are on and the "WHEN" does the problem occur.

Alok Agarwal

unread,
Jan 4, 2013, 9:56:18 AM1/4/13
to seleniu...@googlegroups.com
Thanks MMOpta.

But, what kind of information do you want me to share with you?
Please suggest.

Regards,
Alok.

Dan Flucus

unread,
Jan 7, 2013, 5:35:42 AM1/7/13
to seleniu...@googlegroups.com
Hi,

Try using a javascript instead of classic sendKeys:

((JavascriptExecutor) driver).executeScript("document.getElementById('id1').value='01.75'");

Mark Collin

unread,
Jan 7, 2013, 6:35:29 AM1/7/13
to seleniu...@googlegroups.com
Why would you do this?

You don't know what the problem is, so the first thing you suggest is
sidestepping Selenium's API completely and using your own JavaScript
snippet instead of the Native Events/Google Atoms (I'm willing to put
money on the fact that the Google atoms are either the same, or most
likely better JavaScript code) that Selenium uses? This effectivly
means that any updates/fixes to logic added by the Selenium devs will
now no longer be used because you are using your own JavaScript
implementation of a command.

In my book this really is not helpful advice at all, it's unhelpful
advice that effectively stops the OP from gaining any benefit of future
development that goes into Selenium.
> --
> You received this message because you are subscribed to the Google
> Groups "Selenium Users" group.
> To post to this group, send email to seleniu...@googlegroups.com.
> To unsubscribe from this group, send email to
> selenium-user...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/selenium-users/-/Xz-RV9ueMzkJ.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Mark Collin

unread,
Jan 7, 2013, 6:38:28 AM1/7/13
to seleniu...@googlegroups.com
We would need to see your test code and the page HTML to be able to help
you.
> --
> You received this message because you are subscribed to the Google
> Groups "Selenium Users" group.
> To post to this group, send email to seleniu...@googlegroups.com.
> To unsubscribe from this group, send email to
> selenium-user...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/selenium-users/-/-zW_AeqJ464J.

DarthOpto

unread,
Jan 7, 2013, 5:17:55 PM1/7/13
to seleniu...@googlegroups.com
I ran into an issue where it simply was not feasible to use SendKeys. The JavaScript executor was the option that worked. It would be much more helpful for Selenium to have an option of SendText where it sends a whole block of text rather than typing single characters. 

Oscar Rieken

unread,
Jan 8, 2013, 11:33:52 PM1/8/13
to seleniu...@googlegroups.com
I agree with Mark there is rarely if ever a real need for having to bypass how the selenium api does things. 

posting an html example and the code you have tried always helps others see what you have tried possibly come up with solutions that may have been over looked

Also sending a block of text isn't how the user interacts with a browser. which is probably why selenium sends keystrokes and also doesn't let you interact with elements that are not visible.



To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/STAjrsSn800J.

Alok Agarwal

unread,
Feb 5, 2013, 4:40:52 AM2/5/13
to seleniu...@googlegroups.com
Thanks all for your kind suggestions.

Please find the HTML given below:

<table width="724" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td width="413">
<iframe id="IfldQuestionTitle" width="413" scrolling="no" height="72" marginheight="1" marginwidth="1" name="IfldQuestionTitle" onfocus="rT('IfldQuestionTitle')" onblur="rT('')" src="../images/c.gif">
<html>
<head>
</head>
<body>
this is the area where I want to enter text of my test question.
</body>
</html>
</iframe>
<input type="hidden" name="fldQuestionTitle">
</td>


Thanks,
Alok.

On Friday, January 4, 2013 7:55:33 PM UTC+5:30, Alok Agarwal wrote:

Mark Collin

unread,
Feb 5, 2013, 7:29:58 AM2/5/13
to seleniu...@googlegroups.com
I think you mean driver.switchTo().frame("IfldQuestionTitle");


On 05/02/2013 12:20, manoj ks wrote:
driver.shiftTo().frame("IfldQuestionTitle");
driber.findElement(By.xpath("xpath_expression")).sendKeys("send the keys");
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/TFBbFarfAqIJ.

Alok Agarwal

unread,
Feb 5, 2013, 7:34:23 AM2/5/13
to seleniu...@googlegroups.com
I tried that, but it didn't help me.

On Tue, Feb 5, 2013 at 5:50 PM, manoj ks <ksma...@gmail.com> wrote:
driver.shiftTo().frame("IfldQuestionTitle");
driber.findElement(By.xpath("xpath_expression")).sendKeys("send the keys");
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.

manoj ks

unread,
Feb 5, 2013, 7:45:11 AM2/5/13
to seleniu...@googlegroups.com
i am facing some issue when trying to invoke chrome using selenium web driver. can any one help me with this.

        System.setProperty("webdriver.chrome.driver", "/Users/support/Desktop/Google Chrome.app/Contents/MacOS/Google Chrome");
        driver = new ChromeDriver();
        driver.get("file:///Users/support/Desktop/Updated/Selenium_Framwrk_jxl/Registration.html");

the error which i am getting is..

[42257:-1403235648:0205/181428:ERROR:process_singleton_mac.cc(106)] Unable to obtain profile lock.
Exception in thread "main" org.openqa.selenium.remote.UnreachableBrowserException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 20:21:45'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.4', java.version: '1.6.0_35'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:216)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:111)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:115)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:161)
    at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:107)
    at com.pack.WebTableExample.main(WebTableExample.java:32)
Caused by: org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '2.28.0', revision: '18309', time: '2012-12-11 20:21:45'
System info: os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.7.4', java.version: '1.6.0_35'
Driver info: driver.version: ChromeDriver
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:165)
    at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:62)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:506)
    ... 6 more
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [http://localhost:15326/status] to be available after 20003 ms
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:104)
    at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:163)
    ... 8 more
Caused by: com.google.common.util.concurrent.UncheckedTimeoutException: java.util.concurrent.TimeoutException
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:143)
    at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:79)
    ... 9 more
Caused by: java.util.concurrent.TimeoutException
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:228)
    at java.util.concurrent.FutureTask.get(FutureTask.java:91)
    at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:130)
    ... 10 more

Krishnan Mahadevan

unread,
Feb 5, 2013, 7:47:44 AM2/5/13
to seleniu...@googlegroups.com
Spend some time reading through this wiki page : http://code.google.com/p/selenium/wiki/ChromeDriver#Troubleshooting

Instead of providing the path of your chrome driver, you are providing it the path of chrome browser binary !

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"



To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/ieD-u4mLEQQJ.

Krishnan Mahadevan

unread,
Feb 5, 2013, 7:48:29 AM2/5/13
to seleniu...@googlegroups.com
And please DONOT HIJACK threads 

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

manoj ks

unread,
Feb 5, 2013, 7:50:01 AM2/5/13
to seleniu...@googlegroups.com
Or you can also try this provided you have only one iframe in your html.

driver.switctTo().frame(0);
driver.findElement(By.xpath("xpath_expression")).sendKeys("send the keys");

manoj ks

unread,
Feb 5, 2013, 8:01:35 AM2/5/13
to seleniu...@googlegroups.com
Thank you.
i have clearly mentioned about the issue in
https://groups.google.com/forum/#!topic/selenium-users/_d4jqdxNvkk

Bharat patel

unread,
Feb 5, 2013, 9:59:25 AM2/5/13
to seleniu...@googlegroups.com
Try by clearing text  box and then enter your value. Probably this will work.

driver.TEXTBOX.clear()
driver.TEXTBOX.sendkeys()


Regards
Bharat

Alok Agarwal

unread,
Feb 5, 2013, 10:04:46 AM2/5/13
to seleniu...@googlegroups.com
I tried that, it doesn't work.
Probably, it can be my application's issue.

Thanks,
Alok

To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/KMV99tV8K4wJ.

Colin Main

unread,
Nov 4, 2013, 9:21:19 AM11/4/13
to seleniu...@googlegroups.com
I would start with looking at the structure of the HTML file - most of the markup seems to be outside the <html> tags. I don't know how Selenium will deal with this but the DOM will be a bit strange.
Reply all
Reply to author
Forward
0 new messages