Thank you so much.The best thing about you is that you reply to each comment i.e. whatever problems we face u always help each and every person with your valuable suggestions. God bless you :)
Sir i m getting the error Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:37386 Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z' System info: host: 'DESKTOP-M12DO3O', ip: 'XXX.XXX.X.XX', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181' Firefox version is 62, JAVA is 1.8, added all the dependencies as per tutorial. Kindly assist.
Hi Anurag, looks like version compatibility issue, check this stackoverflow.com/questions/49282494/java-net-connectexception-failed-to-connect-to-localhost-error-with-selenium-3
On minute 3:53. Where do you paste the copied link from eclipse? I have a new Mac and your Finder looks different and you are not clear about where are you pasting the copied file. Please elaborate. Thank you
Hi Raghav, I am on it, During pasting Gecko exe in to driver folder getting this error cannot paste clipboard contents into selected elements Eclipse. I tried many times can you help me or is there any forum where i can put my queries and get answers if i get stuck somewhere. thank you.
after adding the projectPath, am not getting the FF webpage displayed. Below error: String projectPath = System.getProperty("user.dir"); System.out.println("projectPath:" +projectPath); System.setProperty("webdriver.gecko.driver", projectPath+"//drivers//geckodriver//geckodriver.exe"); WebDriver Console Output: projectPath:C:\Users\dell\eclipse-workspace\SeleniumMavenProject Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Users\dell\eclipse-workspace\SeleniumMavenProject\geckodriver\geckodriver.exe
Hi Prashant, you can try using a relative path in your project. Check this - stackoverflow.com/questions/51889327/java-lang-illegalstateexception-the-driver
Hi May I ask your help? I am not able to run the test, I have this issue: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
Hi sir, Im write all the code of and followed by steps i.e installation of java and eclipse,selenium mozilla driver in my pro was not executed.Its not produces errors.what was the problem ?
Hi Vandana, it should mostly be compatibility issue with geckodriver and selenium. You can try diff ver. Check this - stackoverflow.com/questions/40235243/unable-to-reach-browsersession-not-created-exception stackoverflow.com/questions/40106844/selenium-3-0-firefx-driver-fails-with-org-openqa-selenium-sessionnotcreatedexcep/42251165
I am getting this error "Description Resource Path Location Type Archive for required library: 'C:/Users/AMAR/.m2/repository/com/google/guava/guava/25.0-jre/guava-25.0-jre.jar' in project 'SeleniumJavaFramework' cannot be read or is not a valid ZIP file SeleniumJavaFramework Build path Build Path Problem " on my windows 7 system. Please tell how to resolve
@@RaghavPal , All sorted. the new instance of IE driver was above the set property line and so when I ran the progarm, it could not locate the path of the IE driver
@@RaghavPal I have another issue. I am trying to execute the find element tutorials with webDriverManager, but the sendkeys is not executed as in your demo. I probably may be doing something wrong, any advise?
@@RaghavPal Please I have this exception, can you help: WARNING: Unable to find an exact match for CDP version 112, so returning the closest version found: 111 Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@id='APjFqb']"}
Dinero Yes, you should set the property if your Firefox browser pops up automatically when you run your Selenium Java tests. This is because the default behavior of Selenium is to open a new browser window each time a test is executed. By setting the property, you can instruct Selenium to reuse an existing browser window, which can improve the performance and efficiency of your tests. To set the property, you can use the following code: ```java System.setProperty("webdriver.gecko.driver", "path/to/geckodriver.exe"); FirefoxOptions options = new FirefoxOptions(); options.setExistingDriver(true); WebDriver driver = new FirefoxDriver(options); ``` This code will first set the path to the GeckoDriver executable, which is the executable file that Selenium uses to communicate with Firefox. Then, it will create a FirefoxOptions object and set the existingDriver property to true. This tells Selenium to reuse an existing Firefox browser window if one is available. Finally, it will create a new FirefoxDriver object and pass the FirefoxOptions object to the constructor. If you do not set the existingDriver property to true, Selenium will always open a new Firefox browser window each time a test is executed. This can be wasteful of resources and can slow down your tests, especially if you are running a large number of tests. Here are some additional benefits of using the existingDriver property: *Reduced startup time:* Selenium does not need to spend time starting a new browser window each time a test is executed. *Reduced memory usage:* Selenium does not need to allocate memory for a new browser window each time a test is executed. *Improved test stability:* Selenium tests are less likely to fail if the Firefox browser window is already open and in a stable state. Overall, it is a good practice to set the existingDriver property to true when running Selenium Java tests with Firefox. This can improve the performance, efficiency, and stability of your tests.
Hi Sir, Thanks for this very informative video. My drivers are not working using Mac . It is giving error ‘driver is not executable’ plz guide me in this regard.
Hi Asma, are you using windows or linux. You can try using a diff ver of deriver. Also check this stackoverflow.com/questions/46605028/java-running-selenium-tests-on-linux-using-geckodriver-driver-is-not-executabl
Hello Sir , I am using ChromeDriver but getting below error- "unknown error: unable to discover open pages (Driver info: chromedriver=2.0,platform=Windows NT 6.2 x86_64)"
Hi Yasha, try to use a newer version of chromedriver, Also the ver of Chrome on your system and that of chromedriver should match - stackoverflow.com/questions/21001652/chrome-driver-error-using-selenium-unable-to-discover-open-pages
When i run the java program, firefox launches but does nothing. The URL doesnt get pasted into the address bar. instead i get a robot head icon (where the padlock icon is usually) and an orange striped blank address bar. Any ideas why this is?
Ive noticed in the logs that my steps are slightly different, though ive written the code correctly: 1536669439784 geckodriver INFO geckodriver 0.21.0 1536669439800 geckodriver INFO Listening on 127.0.0.1:36302 1536669440534 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\eamon\\AppData\\Local\\Temp\ ust_mozprofile.cgUFQENXOI3X"
Hi Raghav, I met below errors when trying to run the project, would you please give me some hint? Thank you. I have searched online but haven't found anything valuable. Some have the similar issue due to gecko driver currupt, but my gecko driver works fine. Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:31158 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'LENOVO-PC', ip: '192.168.1.118', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_162' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:147) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125) at BrowserTest.main(BrowserTest.java:9) Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:31158 at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247) at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:165) at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257) at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135) at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114) at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147) at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121) at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200) at okhttp3.RealCall.execute(RealCall.java:77) at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:103) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:105) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83) ... 6 more Caused by: java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source) at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source) at java.net.AbstractPlainSocketImpl.connect(Unknown Source) at java.net.PlainSocketImpl.connect(Unknown Source) at java.net.SocksSocketImpl.connect(Unknown Source) at java.net.Socket.connect(Unknown Source) at okhttp3.internal.platform.Platform.connectSocket(Platform.java:129) at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:245) ... 28 more
Hi Louisa, even I could not find much on this online, Can you try using webdriver manager. There is a video in the same playlist on that. We can check after that.
@@RaghavPal Hi Raghav, thank you for the reply. I searched online some said this is due to the incompatible version of webdriver and chrome/gecko drivers, some said it is due to the missing 127.0.0.1 localhost in /etc/hosts, howerver I tried to change the /etc/hosts, but I cannot connect to internet after doing this, I tried with simple env: D:\Linlin\Eclipse>python Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> from selenium import webdriver >>> driver = webdriver.Chrome() Traceback (most recent call last): File "", line 1, in File "C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in __init__ self.service.start() File "C:\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 104, in start raise WebDriverException("Can not connect to the Service %s" % self.path) selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver >>> driver = webdriver.Chrome("d:/linlin/eclipse/drivers/chromedriver/chromedriver.exe") --------------------------------------->chrome is driven by specify the .exe loation, but hang here DevTools listening on ws://127.0.0.1:34585/devtools/browser/acb5b529-7a23-46e5-b0c9-3a021b5f11a1 Traceback (most recent call last): File "", line 1, in File "C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__ desired_capabilities=desired_capabilities) File "C:\Python37\lib\site-packages\selenium\webdriver emote\webdriver.py", line 156, in __init__ self.start_session(capabilities, browser_profile) File "C:\Python37\lib\site-packages\selenium\webdriver emote\webdriver.py", line 251, in start_session response = self.execute(Command.NEW_SESSION, parameters) File "C:\Python37\lib\site-packages\selenium\webdriver emote\webdriver.py", line 320, in execute self.error_handler.check_response(response) File "C:\Python37\lib\site-packages\selenium\webdriver emote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: chrome not reachable (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.17134 x86_64) I add a comment in the thread github.com/SeleniumHQ/selenium/issues/6623 awaiting for response. However I tried on MAC and it worked, so I just keep learning on MAC. Thank you. :)
Tried the webdriver manager as well, it does not work either... SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See www.slf4j.org/codes.html#StaticLoggerBinder for further details. Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 34815 Only local connections are allowed. Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code. Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start. Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'LENOVO-PC', ip: '192.168.1.118', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_162' Driver info: driver.version: ChromeDriver at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:202) at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:188) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:181) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:168) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:123) at SeleniumClass.main(SeleniumClass.java:10) Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [localhost:34815/status] to be available after 20002 ms at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100) at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:197) ... 9 more Caused by: java.util.concurrent.TimeoutException at java.util.concurrent.FutureTask.get(Unknown Source) at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:156) at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75) ... 10 more
Hi Roopali, There is a session to do this on Eclipse. I believe it should be the same for IntelliJ, you have to place chromedriver.exe in the folder and provide its path in script. Pls try and let me know if you face any issues
Goto the folder on your system and then try Also you can avoid adding browser drivers if you use Webdrver Manager - th-cam.com/video/8vWTgyoG0nc/w-d-xo.html
@@RaghavPal Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108) at BrowserTesting.main(BrowserTesting.java:13) Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 2 more
This usually means that you don't have Guava (which is a dependency for Selenium). Can get it from here - code.google.com/p/guava-libraries/ stackoverflow.com/questions/18684202/java-lang-noclassdeffounderror-com-google-common-collect-maps-selenium
Thanks a lot for explaining sir ☺ but in case of cross browser testing do we need write multiple times abt our driver location for Chrome, Firefox and IE.
Hello Raghav, I am getting this exception before adding gecko driver Exception in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'AKSHATHs-MacBook-Pro.local', ip: 'fe80:0:0:0:1436:8455:2d0f:b91a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_161' Driver info: driver.version: FirefoxDriver at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:100) at java.util.Optional.orElseGet(Optional.java:267) at org.openqa.selenium.firefox.FirefoxOptions.getBinary(FirefoxOptions.java:216) at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:187) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:147) at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125) at SelJavaBrowserTest.main(SelJavaBrowserTest.java:6)
Hi Aravindh, You can add File pathToBinary = new File("C:\\user\\Programme\\FirefoxPortable\\App\\Firefox\\firefox.exe"); FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary); FirefoxProfile firefoxProfile = new FirefoxProfile(); WebDriver driver = new FirefoxDriver(ffBinary,firefoxProfile); stackoverflow.com/questions/20950748/cannot-find-firefox-binary-in-path-make-sure-firefox-is-installed
So no matter what I do for the geckodriver , I have copied , dragged and dropped : I get the same message when I try running: Connect to localhost: 1264 [localhost/127.0.0.1] failed : Connection refused :
Hi Allen The "Connection refused" error typically occurs when the geckodriver is unable to establish a connection with the Firefox browser. Here are a few things you can check to resolve this issue: Verify the geckodriver version: Ensure that you have the correct version of geckodriver that is compatible with your Firefox browser version. You can download the appropriate geckodriver version from the official Mozilla GitHub repository. Check the geckodriver path: Make sure that the geckodriver executable is in the system's PATH or provide the absolute path to the geckodriver binary in your code. If you're not sure about the PATH or the geckodriver location, you can try specifying the full path to the geckodriver executable. Check the Firefox browser version: Ensure that you have a compatible version of Firefox installed on your system. Geckodriver is specifically designed to work with Firefox, so make sure both are compatible. Check if Firefox is running: Ensure that Firefox is running and accessible on your system. Sometimes, if Firefox is not open or is not configured properly, geckodriver may fail to connect. Open Firefox manually and make sure it is functioning correctly. Firewall or antivirus settings: Check if any firewall or antivirus software is blocking the connection. Temporarily disable any firewall or antivirus software and try running the geckodriver again to see if the issue persists.
Hi.Raghav ,i hv a user form ,1 text field and 10 radiobuttons and 10 checkboxes.I need to submit and verify those are displayed on the page. So do i need to submit 10 times and verify those???
If I get you right you need to repeat the same actions with diff sets of data. If I am right, then you do not need to write the code 10 times, It will just be the same code and data you can iterate from excel file. If there is something different I understood, pls explain the details with example or if you can send me your url
@@RaghavPal Thanks Raghav,i just wnt to know.the.normal.practice of automating.There is registration form name ,username,2 radio buttons(male or female) .I need to.submit and verify the entered details are displayed on the page. What will be the normal .approach
Hi Jino, Normal approach should be to use the data either from excel or if you do not want to go data driven and put your data into some file and use during automation and then on the other page you can verify the same data is present. Again you can refer your source data for this.
I get this error when I tried this code "Caused by: org.openqa.selenium.WebDriverException: Driver server process died prematurely." I have latest selenium-java 4.5.6 and newly installed FF (106.0 64 bit). Gecko driver 0.32.0, JAVA_HOME is set to 1.8. Could you help resolve.
Hi Raghav sir, I am a manual tester who doesn't have programming knowledge. I want to learn automation testing but before taking a step ahead I want to clear some of my doubts. Please help me ASAP... 1)What is the purpose of creating framework and why it needed? 2)Is it compulsory to create framework? 3)How the concept of creating framework came into picture? 4)Why we cannot start with automation testing directly using selenium and eclipse without creating framework? 5)Want to know the details of framework so that I can understand the framework concept thoroughly. Sir, Please help.
Hi, 1)What is the purpose of creating framework and why it needed? th-cam.com/video/8WKhMsS9HBw/w-d-xo.html 2)Is it compulsory to create framework? For handling automation of an application which needs to be rerun multiple times having framework helps so that you can do efficient automation and invest time once in setting up the framework and then can manage test automation in a well-structured way. 3)How the concept of creating framework came into picture? As per the needs of automation testing grew and it became a very much needed part in projects. To handle automation efficiently and manage properly, frameworks creation was started. 4)Why we cannot start with automation testing directly using selenium and eclipse without creating framework? You will need some library as per the application in consideration. For e.g. for handling a web browser application, you will need a lib that can do browser operations like selenium. Now you can do automation by creating or generating simple scripts and not creating a full fledged frmaework, However this will not be ideal if you need to rerun this multiple times with external data and other features. 5)Want to know the details of framework so that I can understand the framework concept thoroughly. Yes you can. Can start with any course and learn step by step. Udemy - www.udemy.com/user/raghav-pal-3/ Online Courses - automationstepbystep.com/909-2/online-courses/
Hi sir, I watch ur videos, it's helpful no doubt. While trying to launch firefox briwser, I got sessionNotCreatedException. How to resolve this Other chrome browser launched successfully.
Hi Kalyani The SessionNotCreatedException error in Selenium Java can occur for a few reasons, such as: * The Firefox driver is not installed or is not in the system path. * The Firefox version is not compatible with the Selenium version. * There is a problem with the Firefox configuration. * There is a problem with the Firefox binary. To resolve the SessionNotCreatedException error, you can try the following: * Check that the Firefox driver is installed and in the system path. * Check that the Firefox version is compatible with the Selenium version. * Reconfigure Firefox. * Reinstall Firefox.
Hi, i am using windows 10 and my firefox is version 74. Do i need Gecko driver, i have also tried following your steps but i am still having this error exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see github.com/mozilla/geckodriver. The latest version can be downloaded from github.com/mozilla/geckodriver/releases
Your question - "need responsive testing firefox with selenium " is very generic, You will need to try running test on your application, following the videos and online resources, and then in case you face any issues can post here
@@RaghavPal th-cam.com/video/RHtCRDu0MWs/w-d-xo.html&ab_channel=KnowledgeWareTrainingInstitute > The same process in this video does not work in firefox, I need to find a way
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line . This is my problem
Hi Sadiya, this can help python.tutorialink.com/expected-browser-binary-location-but-unable-to-find-binary-in-default-location-no-mozfirefoxoptions-binary-capability-provided/
Hi Sir, this is what i am trying to run System.setProperty("Webdriver.gecko.driver", "C:\\Users\\lanre\\workspace\\SeleniumTest\\Drivers\\GeckoDriver\\geckodriver.exe")
Hello sir by using Firefox browser driver gecko driver it's throws exception yy by using Firefox driver directly its giving the output yy what the reason can u give reply pls
Bhargavi When you use Selenium with Java and the Firefox browser, there are some ways to interact with the browser: Using GeckoDriver: GeckoDriver is a proxy driver that interacts with the Firefox browser. It's a separate executable that runs alongside your Java code. When you use GeckoDriver, Selenium sends commands to the GeckoDriver, which then interacts with the Firefox browser. Using FirefoxDriver directly: FirefoxDriver is a built-in driver in Selenium that interacts directly with the Firefox browser. It doesn't require a separate executable like GeckoDriver Using WebDriverManager: you can also use WebDriverManager to manage your WebDriver instances, including GeckoDriver. WebDriverManager is a library that simplifies the process of managing WebDriver instances by automatically downloading and managing the WebDriver executable Now, let's talk about the exceptions you're seeing. When you use GeckoDriver and it throws an exception, there could be several reasons for this: Version incompatibility: Make sure that the version of GeckoDriver you're using is compatible with the version of Firefox you're using. You can check the compatibility on the GeckoDriver GitHub page. Incorrect GeckoDriver path: Ensure that the path to the GeckoDriver executable is correct and the executable is in the system's PATH. Browser version issues: If you're using a very old or very new version of Firefox, it might not be supported by the GeckoDriver. On the other hand, when you use FirefoxDriver directly and it works, it's likely because FirefoxDriver is a built-in driver that doesn't require a separate executable like GeckoDriver. However, please note that FirefoxDriver is deprecated and not recommended for use. To troubleshoot the issue, I would recommend the following: Check the versions of GeckoDriver and Firefox to ensure they're compatible. Verify that the path to the GeckoDriver executable is correct. Try updating or downgrading the GeckoDriver version to see if that resolves the issue. -
Thank you so much.The best thing about you is that you reply to each comment i.e. whatever problems we face u always help each and every person with your valuable suggestions. God bless you :)
So nice of you Tajinder
It's great. I'm really enjoying this lesson series.👌
Thank you, Mr. Raghav 👍🤟🙏
Most welcome Vikum
absolutely you are brilliant , your lesson is highly efficient , i am proud of you sincerely, kind regards Mr Raghaf.
Thanks Hazim
Very good content with proper explanation. Great work Raghav
Thanks for watching Ashvini
Sir i m getting the error
Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/127.0.0.1:37386
Build info: version: '3.13.0', revision: '2f0d292', time: '2018-06-25T15:24:21.231Z'
System info: host: 'DESKTOP-M12DO3O', ip: 'XXX.XXX.X.XX', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_181'
Firefox version is 62, JAVA is 1.8, added all the dependencies as per tutorial.
Kindly assist.
Hi Anurag, looks like version compatibility issue, check this stackoverflow.com/questions/49282494/java-net-connectexception-failed-to-connect-to-localhost-error-with-selenium-3
On minute 3:53. Where do you paste the copied link from eclipse? I have a new Mac and your Finder looks different and you are not clear about where are you pasting the copied file. Please elaborate. Thank you
You can do a right click and check the options
Hi Sir,
Thanks a ton i tried the same exercise again and found my mistakes, finally my program run & it working fine.
Great to know this Shekhar, All the best.
Hi Raghav,
I am on it, During pasting Gecko exe in to driver folder getting this error cannot paste clipboard contents into selected elements Eclipse. I tried many times can you help me or is there any forum where i can put my queries and get answers if i get stuck somewhere. thank you.
Hi Kavita, can do it physically, i.e. from the folder explorer outside eclipse
after adding the projectPath, am not getting the FF webpage displayed.
Below error:
String projectPath = System.getProperty("user.dir");
System.out.println("projectPath:" +projectPath);
System.setProperty("webdriver.gecko.driver", projectPath+"//drivers//geckodriver//geckodriver.exe");
WebDriver
Console Output:
projectPath:C:\Users\dell\eclipse-workspace\SeleniumMavenProject
Exception in thread "main" java.lang.IllegalStateException: The driver executable does not exist: C:\Users\dell\eclipse-workspace\SeleniumMavenProject\geckodriver\geckodriver.exe
Hi Prashant, you can try using a relative path in your project. Check this - stackoverflow.com/questions/51889327/java-lang-illegalstateexception-the-driver
Thanks Raghav, it is so helpful.My framework initiates the webdriver but can not open the browser page. What should be the solution. Please guide me
Hi Asma, are you using gekco driver exe file. Will need to see the logs
I am facing problem with maven dependencies like plugin execution not covered by lifecycle configuration
Hi Jaya, if you can send detailed logs, I can check. Also check other users comments before further troubleshooting
Very helpful Raghav! You save me with this video. You cover the error that many tutorial page fails to cover.
Glad to know it helped
Hi May I ask your help? I am not able to run the test, I have this issue:
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
I solved it :D I had WebDriver driver = new FirefoxDriver(); before the set property line hahah
Great to know
How can be resolved the exception
Hi sir, Im write all the code of and followed by steps i.e installation of java and eclipse,selenium mozilla driver in my pro was not executed.Its not produces errors.what was the problem ?
Hi, it will be difficult to say without any error message or logs. Try to do the steps again
Could not find or load main class BrowserTest. Please suggest how to overcome
Hi Akash, I have no logs or setup to troubleshoot. Pls check all the steps again with the video
Hii raghav, i am following ur steps as it is in Windows but am getting session not created exception
Hi Vandana, it should mostly be compatibility issue with geckodriver and selenium. You can try diff ver. Check this - stackoverflow.com/questions/40235243/unable-to-reach-browsersession-not-created-exception
stackoverflow.com/questions/40106844/selenium-3-0-firefx-driver-fails-with-org-openqa-selenium-sessionnotcreatedexcep/42251165
This session is also very great session sir thank you so much for this great information and also your valuable time
Most welcome Annuja
I am getting this error "Description Resource Path Location Type
Archive for required library: 'C:/Users/AMAR/.m2/repository/com/google/guava/guava/25.0-jre/guava-25.0-jre.jar' in project 'SeleniumJavaFramework' cannot be read or is not a valid ZIP file SeleniumJavaFramework Build path Build Path Problem
" on my windows 7 system.
Please tell how to resolve
error resolved thanks
Glad to know this Amar
Good day. I have a question about whether it is possible that selenium can connect to tor browser. what is the code in java?. Thanks you very much.
Hi El, I have shown that in the videos of this series. You can also check other Selenium playlists here automationstepbystep.com/
please I got this exception when running Internet explorer browser test with Webdriver, please advice
What exception James, will need more details
@@RaghavPal , All sorted. the new instance of IE driver was above the set property line and so when I ran the progarm, it could not locate the path of the IE driver
Great
@@RaghavPal I have another issue. I am trying to execute the find element tutorials with webDriverManager, but the sendkeys is not executed as in your demo. I probably may be doing something wrong, any advise?
@@RaghavPal Please I have this exception, can you help:
WARNING: Unable to find an exact match for CDP version 112, so returning the closest version found: 111
Exception in thread "main" org.openqa.selenium.NoSuchElementException: no such element: Unable to locate element: {"method":"xpath","selector":"//input[@id='APjFqb']"}
Should I set property if my driver browser pops automatically?
Dinero
Yes, you should set the property if your Firefox browser pops up automatically when you run your Selenium Java tests. This is because the default behavior of Selenium is to open a new browser window each time a test is executed. By setting the property, you can instruct Selenium to reuse an existing browser window, which can improve the performance and efficiency of your tests.
To set the property, you can use the following code:
```java
System.setProperty("webdriver.gecko.driver", "path/to/geckodriver.exe");
FirefoxOptions options = new FirefoxOptions();
options.setExistingDriver(true);
WebDriver driver = new FirefoxDriver(options);
```
This code will first set the path to the GeckoDriver executable, which is the executable file that Selenium uses to communicate with Firefox. Then, it will create a FirefoxOptions object and set the existingDriver property to true. This tells Selenium to reuse an existing Firefox browser window if one is available. Finally, it will create a new FirefoxDriver object and pass the FirefoxOptions object to the constructor.
If you do not set the existingDriver property to true, Selenium will always open a new Firefox browser window each time a test is executed. This can be wasteful of resources and can slow down your tests, especially if you are running a large number of tests.
Here are some additional benefits of using the existingDriver property:
*Reduced startup time:* Selenium does not need to spend time starting a new browser window each time a test is executed.
*Reduced memory usage:* Selenium does not need to allocate memory for a new browser window each time a test is executed.
*Improved test stability:* Selenium tests are less likely to fail if the Firefox browser window is already open and in a stable state.
Overall, it is a good practice to set the existingDriver property to true when running Selenium Java tests with Firefox. This can improve the performance, efficiency, and stability of your tests.
Hi Sir, Thanks for this very informative video. My drivers are not working using Mac . It is giving error ‘driver is not executable’ plz guide me in this regard.
Hi Asma, are you using windows or linux. You can try using a diff ver of deriver. Also check this
stackoverflow.com/questions/46605028/java-running-selenium-tests-on-linux-using-geckodriver-driver-is-not-executabl
Hello Sir ,
I am using ChromeDriver but getting below error-
"unknown error: unable to discover open pages
(Driver info: chromedriver=2.0,platform=Windows NT 6.2 x86_64)"
Hi Yasha, try to use a newer version of chromedriver, Also the ver of Chrome on your system and that of chromedriver should match - stackoverflow.com/questions/21001652/chrome-driver-error-using-selenium-unable-to-discover-open-pages
hi sir i am not able to geckodriver it is showing connection isnt private
Hi, this can help
kinsta.com/blog/your-connection-is-not-private/
When i run the java program, firefox launches but does nothing. The URL doesnt get pasted into the address bar. instead i get a robot head icon (where the padlock icon is usually) and an orange striped blank address bar. Any ideas why this is?
Ive noticed in the logs that my steps are slightly different, though ive written the code correctly:
1536669439784 geckodriver INFO geckodriver 0.21.0
1536669439800 geckodriver INFO Listening on 127.0.0.1:36302
1536669440534 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\eamon\\AppData\\Local\\Temp\
ust_mozprofile.cgUFQENXOI3X"
This appears to be with the gecko driver version. I downgraded/regressed to geckodriver 0.16.0 and it works fine. Hmmm.
Great to know this Eamon, this happens due to version incompatibility sometimes. glad you resolved it.
I post these so that hopefully they will help someone else in future with the same issue! ;-)
Yes, this will surely help
Hi Raghav, I met below errors when trying to run the project, would you please give me some hint? Thank you.
I have searched online but haven't found anything valuable. Some have the similar issue due to gecko driver currupt, but my gecko driver works fine.
Exception in thread "main" org.openqa.selenium.WebDriverException: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:31158
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'LENOVO-PC', ip: '192.168.1.118', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_162'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:92)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:147)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125)
at BrowserTest.main(BrowserTest.java:9)
Caused by: java.net.ConnectException: Failed to connect to localhost/0:0:0:0:0:0:0:1:31158
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:247)
at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:165)
at okhttp3.internal.connection.StreamAllocation.findConnection(StreamAllocation.java:257)
at okhttp3.internal.connection.StreamAllocation.findHealthyConnection(StreamAllocation.java:135)
at okhttp3.internal.connection.StreamAllocation.newStream(StreamAllocation.java:114)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:42)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:126)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:147)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:121)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:200)
at okhttp3.RealCall.execute(RealCall.java:77)
at org.openqa.selenium.remote.internal.OkHttpClient.execute(OkHttpClient.java:103)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:105)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:74)
at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:136)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:83)
... 6 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at okhttp3.internal.platform.Platform.connectSocket(Platform.java:129)
at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:245)
... 28 more
Hi Louisa, even I could not find much on this online, Can you try using webdriver manager. There is a video in the same playlist on that. We can check after that.
@@RaghavPal Hi Raghav, thank you for the reply. I searched online some said this is due to the incompatible version of webdriver and chrome/gecko drivers, some said it is due to the missing 127.0.0.1 localhost in /etc/hosts, howerver I tried to change the /etc/hosts, but I cannot connect to internet after doing this, I tried with simple env:
D:\Linlin\Eclipse>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> driver = webdriver.Chrome()
Traceback (most recent call last):
File "", line 1, in
File "C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 68, in __init__
self.service.start()
File "C:\Python37\lib\site-packages\selenium\webdriver\common\service.py", line 104, in start
raise WebDriverException("Can not connect to the Service %s" % self.path)
selenium.common.exceptions.WebDriverException: Message: Can not connect to the Service chromedriver
>>> driver = webdriver.Chrome("d:/linlin/eclipse/drivers/chromedriver/chromedriver.exe")
--------------------------------------->chrome is driven by specify the .exe loation, but hang here
DevTools listening on ws://127.0.0.1:34585/devtools/browser/acb5b529-7a23-46e5-b0c9-3a021b5f11a1
Traceback (most recent call last):
File "", line 1, in
File "C:\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 75, in __init__
desired_capabilities=desired_capabilities)
File "C:\Python37\lib\site-packages\selenium\webdriver
emote\webdriver.py", line 156, in __init__
self.start_session(capabilities, browser_profile)
File "C:\Python37\lib\site-packages\selenium\webdriver
emote\webdriver.py", line 251, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python37\lib\site-packages\selenium\webdriver
emote\webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "C:\Python37\lib\site-packages\selenium\webdriver
emote\errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: chrome not reachable
(Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.17134 x86_64)
I add a comment in the thread github.com/SeleniumHQ/selenium/issues/6623 awaiting for response.
However I tried on MAC and it worked, so I just keep learning on MAC. Thank you. :)
Tried the webdriver manager as well, it does not work either...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Starting ChromeDriver 73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72) on port 34815
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
Exception in thread "main" org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'LENOVO-PC', ip: '192.168.1.118', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_162'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:202)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:188)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:79)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:181)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:168)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:123)
at SeleniumClass.main(SeleniumClass.java:10)
Caused by: org.openqa.selenium.net.UrlChecker$TimeoutException: Timed out waiting for [localhost:34815/status] to be available after 20002 ms
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:100)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:197)
... 9 more
Caused by: java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.google.common.util.concurrent.SimpleTimeLimiter.callWithTimeout(SimpleTimeLimiter.java:156)
at org.openqa.selenium.net.UrlChecker.waitUntilAvailable(UrlChecker.java:75)
... 10 more
How do i add Chrome exe, by creating a folder in IntelliJ ?
Hi Roopali, There is a session to do this on Eclipse. I believe it should be the same for IntelliJ, you have to place chromedriver.exe in the folder and provide its path in script. Pls try and let me know if you face any issues
sir im not able to paste the gecko driver in folder
Goto the folder on your system and then try
Also you can avoid adding browser drivers if you use Webdrver Manager - th-cam.com/video/8vWTgyoG0nc/w-d-xo.html
sir,i m getting exception
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/exec/Executor
Hi Sourav, do you see a caused by section in the logs. Pls check
Hello sir,
i got
Caused by: java.lang.ClassNotFoundException: org.apache.commons.exec.Executor
Exception
Hi Sourav, will require more details. Pls check if you find Caused by section in the logs
@@RaghavPal Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/collect/ImmutableMap
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:108)
at BrowserTesting.main(BrowserTesting.java:13)
Caused by: java.lang.ClassNotFoundException: com.google.common.collect.ImmutableMap
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 2 more
This usually means that you don't have Guava (which is a dependency for Selenium). Can get it from here - code.google.com/p/guava-libraries/
stackoverflow.com/questions/18684202/java-lang-noclassdeffounderror-com-google-common-collect-maps-selenium
But sir it didn't mention in vido
sir i check guava dependency is already there
Thanks a lot for explaining sir ☺ but in case of cross browser testing do we need write multiple times abt our driver location for Chrome, Firefox and IE.
Hi Prateek, no you can add all these in if else condition or switch case. So based on the browser, it will setup the required browser driver
@@RaghavPal Thank you so much sir for response.
Hello Raghav,
I am getting this exception before adding gecko driver
Exception in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'AKSHATHs-MacBook-Pro.local', ip: 'fe80:0:0:0:1436:8455:2d0f:b91a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_161'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.FirefoxBinary.(FirefoxBinary.java:100)
at java.util.Optional.orElseGet(Optional.java:267)
at org.openqa.selenium.firefox.FirefoxOptions.getBinary(FirefoxOptions.java:216)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:187)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:147)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:125)
at SelJavaBrowserTest.main(SelJavaBrowserTest.java:6)
Hi Aravindh,
You can add
File pathToBinary = new File("C:\\user\\Programme\\FirefoxPortable\\App\\Firefox\\firefox.exe");
FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);
FirefoxProfile firefoxProfile = new FirefoxProfile();
WebDriver driver = new FirefoxDriver(ffBinary,firefoxProfile);
stackoverflow.com/questions/20950748/cannot-find-firefox-binary-in-path-make-sure-firefox-is-installed
@@RaghavPal Thanks Raghav...
Thank you very much, you explain it perfect.
Thanks for watching Rose
when will you make a video of how to make a framework. It's been a year now I comment in your every video but no luck.
Hi Iori, you mean selenium java framework, its already there, pls check - automationstepbystep.com/
@@RaghavPal Yes but it's a simple framework. It will be good if you can teach us how to make a hybrid framework using cucumber.
So no matter what I do for the geckodriver , I have copied , dragged and dropped : I get the same message when I try running: Connect to localhost: 1264 [localhost/127.0.0.1] failed : Connection refused :
Hi Allen
The "Connection refused" error typically occurs when the geckodriver is unable to establish a connection with the Firefox browser.
Here are a few things you can check to resolve this issue:
Verify the geckodriver version: Ensure that you have the correct version of geckodriver that is compatible with your Firefox browser version. You can download the appropriate geckodriver version from the official Mozilla GitHub repository.
Check the geckodriver path: Make sure that the geckodriver executable is in the system's PATH or provide the absolute path to the geckodriver binary in your code. If you're not sure about the PATH or the geckodriver location, you can try specifying the full path to the geckodriver executable.
Check the Firefox browser version: Ensure that you have a compatible version of Firefox installed on your system. Geckodriver is specifically designed to work with Firefox, so make sure both are compatible.
Check if Firefox is running: Ensure that Firefox is running and accessible on your system. Sometimes, if Firefox is not open or is not configured properly, geckodriver may fail to connect. Open Firefox manually and make sure it is functioning correctly.
Firewall or antivirus settings: Check if any firewall or antivirus software is blocking the connection. Temporarily disable any firewall or antivirus software and try running the geckodriver again to see if the issue persists.
Hi.Raghav ,i hv a user form ,1 text field and 10 radiobuttons and 10 checkboxes.I need to submit and verify those are displayed on the page. So do i need to submit 10 times and verify those???
Hi Jino, You can use data files, (excel files) and re-use your code
@@RaghavPal so i need to create 10 users for chevking 10 radio buttons
If I get you right you need to repeat the same actions with diff sets of data. If I am right, then you do not need to write the code 10 times, It will just be the same code and data you can iterate from excel file. If there is something different I understood, pls explain the details with example or if you can send me your url
@@RaghavPal Thanks Raghav,i just wnt to know.the.normal.practice of automating.There is registration form name ,username,2 radio buttons(male or female) .I need to.submit and verify the entered details are displayed on the page. What will be the normal .approach
Hi Jino, Normal approach should be to use the data either from excel or if you do not want to go data driven and put your data into some file and use during automation and then on the other page you can verify the same data is present. Again you can refer your source data for this.
There seem to be issues running the gecko driver with Catalina. ANyone else seeing this?
Not sure, will check on this Mark
I get this error when I tried this code "Caused by: org.openqa.selenium.WebDriverException: Driver server process died prematurely." I have latest selenium-java 4.5.6 and newly installed FF (106.0 64 bit). Gecko driver 0.32.0, JAVA_HOME is set to 1.8. Could you help resolve.
Hi Yumani, Can check this stackoverflow.com/questions/62993623/invalid-port-exiting-exception-in-thread-main-org-openqa-selenium-webdrivere
hello,
Would you make a video how to create a framework from scratch ? BDD framework?
Hi Ahmad, can check BDD cucumber here - automationstepbystep.com/
Hi Raghav sir,
I am a manual tester who doesn't have programming knowledge. I want to learn automation testing but before taking a step ahead I want to clear some of my doubts. Please help me ASAP...
1)What is the purpose of creating framework and why it needed?
2)Is it compulsory to create framework?
3)How the concept of creating framework came into picture?
4)Why we cannot start with automation testing directly using selenium and eclipse without creating framework?
5)Want to know the details of framework so that I can understand the framework concept thoroughly.
Sir, Please help.
Hi,
1)What is the purpose of creating framework and why it needed?
th-cam.com/video/8WKhMsS9HBw/w-d-xo.html
2)Is it compulsory to create framework?
For handling automation of an application which needs to be rerun multiple times having framework helps so that you can do efficient automation and invest time once in setting up the framework and then can manage test automation in a well-structured way.
3)How the concept of creating framework came into picture?
As per the needs of automation testing grew and it became a very much needed part in projects. To handle automation efficiently and manage properly, frameworks creation was started.
4)Why we cannot start with automation testing directly using selenium and eclipse without creating framework?
You will need some library as per the application in consideration. For e.g. for handling a web browser application, you will need a lib that can do browser operations like selenium. Now you can do automation by creating or generating simple scripts and not creating a full fledged frmaework, However this will not be ideal if you need to rerun this multiple times with external data and other features.
5)Want to know the details of framework so that I can understand the framework concept thoroughly.
Yes you can. Can start with any course and learn step by step.
Udemy - www.udemy.com/user/raghav-pal-3/
Online Courses - automationstepbystep.com/909-2/online-courses/
Nice bro thank you
You're welcome Rajesh
Hi sir, I watch ur videos, it's helpful no doubt.
While trying to launch firefox briwser, I got sessionNotCreatedException.
How to resolve this
Other chrome browser launched successfully.
Hi Kalyani
The SessionNotCreatedException error in Selenium Java can occur for a few reasons, such as:
* The Firefox driver is not installed or is not in the system path.
* The Firefox version is not compatible with the Selenium version.
* There is a problem with the Firefox configuration.
* There is a problem with the Firefox binary.
To resolve the SessionNotCreatedException error, you can try the following:
* Check that the Firefox driver is installed and in the system path.
* Check that the Firefox version is compatible with the Selenium version.
* Reconfigure Firefox.
* Reinstall Firefox.
s i loved tis vid nicely explained step by step. thanks bro
Most welcome Jai
Thank you so much Sir..
Most welcome Supriya
Hi, i am using windows 10 and my firefox is version 74. Do i need Gecko driver, i have also tried following your steps but i am still having this error exception in thread "main" java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see github.com/mozilla/geckodriver. The latest version can be downloaded from github.com/mozilla/geckodriver/releases
Hi Tony, what is your selenium ver. It should be ver 3+. Also, just re-check it should be webdriver.gekco.driver with lower case w
I need responsive testing firefox with selenium :(
You can try selenium commands and can also search for specific scenarios online
@@RaghavPal
I tried every way myself, This issue is important to me, can you help?
Your question - "need responsive testing firefox with selenium " is very generic, You will need to try running test on your application, following the videos and online resources, and then in case you face any issues can post here
@@RaghavPal th-cam.com/video/RHtCRDu0MWs/w-d-xo.html&ab_channel=KnowledgeWareTrainingInstitute >
The same process in this video does not work in firefox, I need to find a way
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line . This is my problem
Hi Sadiya, this can help python.tutorialink.com/expected-browser-binary-location-but-unable-to-find-binary-in-default-location-no-mozfirefoxoptions-binary-capability-provided/
awesomee
thanks
Hi Sir, this is what i am trying to run System.setProperty("Webdriver.gecko.driver", "C:\\Users\\lanre\\workspace\\SeleniumTest\\Drivers\\GeckoDriver\\geckodriver.exe")
Hi Tony, just re-check it should be webdriver.gekco.driver with lower case w
when you have Raghav Pal you don't need any paid workshop.
Thanks for the message Faizan :)
:)
cant understand you.
Sorry to hear this Kyle, if it is due to pronunciation or accent, I will improve on this
Hello sir by using Firefox browser driver gecko driver it's throws exception yy by using Firefox driver directly its giving the output yy what the reason can u give reply pls
Bhargavi
When you use Selenium with Java and the Firefox browser, there are some ways to interact with the browser:
Using GeckoDriver: GeckoDriver is a proxy driver that interacts with the Firefox browser. It's a separate executable that runs alongside your Java code. When you use GeckoDriver, Selenium sends commands to the GeckoDriver, which then interacts with the Firefox browser.
Using FirefoxDriver directly: FirefoxDriver is a built-in driver in Selenium that interacts directly with the Firefox browser. It doesn't require a separate executable like GeckoDriver
Using WebDriverManager: you can also use WebDriverManager to manage your WebDriver instances, including GeckoDriver. WebDriverManager is a library that simplifies the process of managing WebDriver instances by automatically downloading and managing the WebDriver executable
Now, let's talk about the exceptions you're seeing.
When you use GeckoDriver and it throws an exception, there could be several reasons for this:
Version incompatibility: Make sure that the version of GeckoDriver you're using is compatible with the version of Firefox you're using. You can check the compatibility on the GeckoDriver GitHub page.
Incorrect GeckoDriver path: Ensure that the path to the GeckoDriver executable is correct and the executable is in the system's PATH.
Browser version issues: If you're using a very old or very new version of Firefox, it might not be supported by the GeckoDriver.
On the other hand, when you use FirefoxDriver directly and it works, it's likely because FirefoxDriver is a built-in driver that doesn't require a separate executable like GeckoDriver. However, please note that FirefoxDriver is deprecated and not recommended for use.
To troubleshoot the issue, I would recommend the following:
Check the versions of GeckoDriver and Firefox to ensure they're compatible.
Verify that the path to the GeckoDriver executable is correct.
Try updating or downgrading the GeckoDriver version to see if that resolves the issue.
-