Showing posts with label Issues. Show all posts
Showing posts with label Issues. Show all posts

November 30, 2014

Perform Type Action using Java script in Text field

November 30, 2014 1
Perform Type Action using Java script in Text field
To type in a text field/text box  we use sendKeys command. But some times sendKeys will not work some of the text fields. In those situations one of the alternative is using JavaScript. We can use Java script to type in text field.

In below example I used JavaScript to type in text field.
Below is syntax: 
((JavascriptExecutor) driver).executeScript("arguments[0].value = 'some text';",driver.findElement(By.XPath('your xpath')))

June 23, 2011

Make Selenium RC run on FF 5

June 23, 2011 19
Make Selenium RC run on FF 5
After upgrading from FF 3.6 to FF4 or 5...your selenium RC scripts  not running on FF.?


Here is the solution for that...

You need to do a simple thing..you have to Upgrade the old selenium-server file....to selenium-server-standalone-2.0rc3.

Here is the new server file New Selenium Server Jar File

Then replace the old file with new server file in eclipse..then restart your eclipse...Now your old scripts will run in FF4 or FF5.


March 8, 2011

Error while running selenium scripts on Windows 7 and IE8??

March 08, 2011 27
When you run your test script on Windows 7 and firefox it will run. IF you want to run the same test script using windows7 and IE it will give an error...

To avoid that error we need to change the security settings in IE8.

Steps:
Open IE 8
Go to Tools-->Internet options--->Security tab.
Uncheck the Enable protected mode check box.
Click Apply and OK.


Your problem will be solved.......


Hope this will help you...


November 16, 2010

Failed to start: SocketListener0@0.0.0.0:4444

November 16, 2010 29
Failed to start: SocketListener0@0.0.0.0:4444

14:45:33.140 WARN - Failed to start: SocketListener0@0.0.0.0:4444
Exception in thread "main" java.net.BindException: 
Selenium is already running on port 4444. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:378)
at org.openqaselenium.server.SeleniumServer.boot(SeleniumServer.java:224)
at org.openqa.selenium.server.SeleniumServer.main(SeleniumServer.java:188)

This is the most common error which is encountered while starting the selenium server. The origin of this error is the fact that selenium server always tries to listen at port 4444 by default .
There are chances that when you are running tests, the server might not be shutdown properly. In this case, when you try to re-run your tests, you may encounter the following error

I Google for a solution and finally i got solution from my friends blog
Solution for the above problem is , type the below in the browser URL and the server will be stopped

http://localhost:4444/selenium-server/driver/?cmd=shutDownSeleniumServer
Now your should be able to see the message "OKOK" in the browser window. Your server now shut downed. 


Now run your script from eclipse....server will start now with out any problem






October 26, 2010

Unable run test scripts in Firefox??---Unable to delete file lockfile

October 26, 2010 3
Unable run test scripts in Firefox??---Unable to delete file lockfile
Hi...

Here i want to mention about the problem i faced with Firefox(3.6.*)..I created some test scripts using JUnit and able to run in FF(3.5*). Later i upgraded my FF version to 3.6*..Then i got problem

"Could not start Selenium session: Failed to start new browser session: Unable to delete file C:\WINDOWS\TEMP\customProfileDir1249f05ea902412fa46b6c703435ffe6\parent.lock"


I posted question in Google selenium forums...some friends gave suggestions to delete lock file..etc..But it didn't work.

One day i am searching for the same bug in Google..suddenly i found the answer for that...

Here is how to solve that problem

I resolved this problem by updating the selenium version.


Firefox 3.6 requires Selenium 1.04 or higher. If you are using these versions of Firefox and Selenium to create Internet macros for the Internet application, you will get an error message that s "unable to delete" a file named "parent.lock".
This is fixed by an updated selenium-server.jar file. To put this in place, do the following:
  1. Download the updated selenium-server.jar file.
  2. Remove the existing selenium-server.jar file from lib folder (Contains selenium jar files)
  3. Copy the new selenium-server.jar into the Lib folder
  4. Restart the eclipse
If you want more information go through the link


download the new version of selenium server..it will solve the problem.

Hope this will helpful for the FF users...
Cheers....