Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to add the proxy details from client code for selenium grid 4 #2989

Closed
suadhika opened this issue Dec 8, 2022 · 1 comment
Closed

Comments

@suadhika
Copy link

suadhika commented Dec 8, 2022

I am using serenity property:

serenity.proxy.http="XXXXXX:1234"
serenity.proxy.sslProxy="XXXXXX:1234"
serenity.proxy.noProxy="localhost,127.0.0.1,192.168.0.0/16,1........"

webdriver.driver = remote

chrome.capabilities.acceptSslCerts = true
chrome.capabilities.handlesAlerts = true
chrome.capabilities.acceptInsecureCerts = true

But when I see the session created in selenium 4 I can see that no proxy has been set there

{
  "value": {
    "ready": false,
    "message": "Selenium Grid not ready.",
    "nodes": [
      {
        "id": "beed7307-0b0e-4074-91bf-5867a68d48cf",
        "uri": "http:\u002f\u002f192.168.253.29:5555",
        "maxSessions": 1,
        "osInfo": {
          "arch": "amd64",
          "name": "Linux",
          "version": "4.15.0-42-generic"
        },
        "heartbeatPeriod": 60000,
        "availability": "UP",
        "version": "4.6.0 (revision 79f1c02ae20)",
        "slots": [
          {
            "id": {
              "hostId": "beed7307-0b0e-4074-91bf-5867a68d48cf",
              "id": "7e6e18a7-4042-448b-831a-c21b9646c15c"
            },
            "lastStarted": "2022-12-08T12:30:35.519159Z",
            "session": {
              "capabilities": {
                "acceptInsecureCerts": false,
                "browserName": "chrome",
                "browserVersion": "107.0.5304.87",
                "chrome": {
                  "chromedriverVersion": "107.0.5304.62 (1eec40d3a5764881c92085aaee66d25075c159aa-refs\u002fbranch-heads\u002f5304@{#942})",
                  "userDataDir": "\u002ftmp\u002f.com.google.Chrome.vO11am"
                },
                "goog:chromeOptions": {
                  "debuggerAddress": "localhost:42235"
                },
                "networkConnectionEnabled": false,
                "pageLoadStrategy": "normal",
                "platformName": "LINUX",
                "proxy": {
                },
                "se:bidiEnabled": false,
                "se:cdp": "ws:\u002f\u002f192.168.253.29:4444\u002fsession\u002fb522b7f41e8d1bf9b226589a80e68702\u002fse\u002fcdp",
                "se:cdpVersion": "107.0.5304.87",
                "se:vnc": "ws:\u002f\u002f192.168.253.29:4444\u002fsession\u002fb522b7f41e8d1bf9b226589a80e68702\u002fse\u002fvnc",
                "se:vncEnabled": true,
                "se:vncLocalAddress": "ws:\u002f\u002f192.168.253.29:7900",
                "setWindowRect": true,
                "strictFileInteractability": false,
                "timeouts": {
                  "implicit": 0,
                  "pageLoad": 300000,
                  "script": 30000
                },
                "unhandledPromptBehavior": "dismiss and notify",
                "webauthn:extension:credBlob": true,
                "webauthn:extension:largeBlob": true,
                "webauthn:virtualAuthenticators": true
              },
              "sessionId": "b522b7f41e8d1bf9b226589a80e68702",
              "start": "2022-12-08T12:30:35.519159Z",
              "stereotype": {
                "browserName": "chrome",
                "browserVersion": "107.0",
                "platformName": "LINUX",
                "se:noVncPort": 7900,
                "se:vncEnabled": true
              },
              "uri": "http:\u002f\u002f192.168.253.29:5555"
            },
            "stereotype": {
              "browserName": "chrome",
              "browserVersion": "107.0",
              "platformName": "LINUX",
              "se:noVncPort": 7900,
              "se:vncEnabled": true
            }
          }
        ]
      }
    ]
  }
}

Please let me know how can I set the proxy here.

@suadhika suadhika changed the title Not able to add get the proxy details from client code to selenium grid 4 Not able to add the proxy details from client code to selenium grid 4 Dec 8, 2022
@suadhika suadhika changed the title Not able to add the proxy details from client code to selenium grid 4 Not able to add the proxy details from client code for selenium grid 4 Dec 8, 2022
@suadhika
Copy link
Author

suadhika commented Dec 9, 2022

I was able to do this with custom webdriver extension, extending the BeforeAWebdriverScenario interface.

@suadhika suadhika closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant