Open akhilcharugulla opened 2 months ago
Try a Different Port: Sometimes, certain ports may be blocked or in use by other applications. Try using a different port number (e.g., 9222 instead of 9111). make sure no other Chrome instances are running that might interfere with the remote debugging port. If there are, close all Chrome windows and processes, then restart Chrome with the --remote-debugging-port flag.
my observations: I tried the same with Selenium 3.x - its working fine. Same is not working with 4.x versions (could be a bug or this feature is not available in Selenium 4.x).
I tried with 9222 port, I removed chrome instances, logged out other users in chrome, restarted laptop, Changed the browser to edge, but nothing worked
When using selenium 3.1.x version, I am getting different error similar to this as mentioned in stack overflow https://stackoverflow.com/questions/75910086/selenium-chromedriver-cant-open-a-new-chrome-window-with-user-profile
Driver info: driver.version: ChromeDriver
remote stacktrace: GetHandleVerifier [0x00007FF7F5949642+30946]
(No symbol) [0x00007FF7F58FE3D9]
(No symbol) [0x00007FF7F57F6E09]
(No symbol) [0x00007FF7F57E34F4]
(No symbol) [0x00007FF7F5836392]
(No symbol) [0x00007FF7F582BD0B]
(No symbol) [0x00007FF7F58778B9]
(No symbol) [0x00007FF7F5876F20]
(No symbol) [0x00007FF7F586C813]
(No symbol) [0x00007FF7F583A6E5]
(No symbol) [0x00007FF7F583B021]
GetHandleVerifier [0x00007FF7F5A7F84D+1301229]
GetHandleVerifier [0x00007FF7F5A8BDC7+1351783]
GetHandleVerifier [0x00007FF7F5A82A13+1313971]
GetHandleVerifier [0x00007FF7F597DD16+245686]
(No symbol) [0x00007FF7F590759F]
(No symbol) [0x00007FF7F5903814]
(No symbol) [0x00007FF7F59039A2]
(No symbol) [0x00007FF7F58FA3FF]
BaseThreadInitThunk [0x00007FFC161C7374+20]
RtlUserThreadStart [0x00007FFC171DCC91+33]
at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:212)
at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:1034)
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:144)
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:574)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:560)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:546)
at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:265)
at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:662)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
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)
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.
Is there an installation package for mac?
What is java stuff doing here? Wrong repo guys
The new Chromedriver seems to use random ports. Normally you can set the port with the e.g. 9515. That does not work (anymore)! Adding --port=9515 to the option "DriverParams" seems to force Chromedriver to use port 9515. I am niw able to use Chrome v128 and Chromedriver v128 together,
@antmarortega if you able to open chrome in manually opened port , Can you please share source code her. I would take it as a reference and work on the project
My Aim: To open a new tab in manually opened chrome tab through selenium I am trying to use the same chrome version and chrome driver version "127.0.0.1:9111" Tutorial I followed: https://www.youtube.com/watch?v=dYDY0B1CLiM&t=247s
Running the chrome in remote debugging mode_ chrome.exe --remote-debugging-port=9111 --user-data-dir="C:\Users\User\AppData\Local\Google\Chrome\User Data"
Chrome driver is downloaded from this link: https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.100/win64/chromedriver-win64.zip
Error I get: Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: session not created: cannot connect to chrome at 127.0.0.1:9111 from chrome not reachable Host info: host: 'DESKTOP-KJRP5I8', ip: '192.168.56.1' Build info: version: '4.23.0', revision: '4df0a231af' System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '22.0.1' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], debuggerAddress: 127.0.0.1:9111, extensions: []}}]}] at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:114) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:75) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:61) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:162) at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:216) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:174) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:527) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:234) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:163)
at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:114)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:88)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:83)
at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:72)
at org.example.ExcelToGoogleSearch.main(ExcelToGoogleSearch.java:31)
My code to access the manually opened browser:
package org.example; import org.apache.poi.ss.usermodel.*; import org.apache.poi.xssf.usermodel.XSSFWorkbook; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions;
import java.io.FileInputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List;
public class ExcelToGoogleSearch {
}