how to pass more additional proxy options for SauceLabs plugin?

28 views
Skip to first unread message

medv...@gmail.com

unread,
Jan 3, 2018, 9:19:22 AM1/3/18
to Geb User Mailing List
Hi,
how can I can pass more additional options?

 connect {
 additionalOptions
= ['--proxy-tunnel', 'proxy.bechtle.de:80']
 
}


The above is working fine, but I need to add http and https proxy as well.

SauceLabs support is suggesting this java code

System.getProperties().put("http.proxyHost", proxyHost);
System.getProperties().put("http.proxyPort", proxyPort);
System.getProperties().put("https.proxyHost", proxyHost);
System.getProperties().put("https.proxyPort", proxyPort);
but how do I apply this for the plugin in Geb?

Thank you,
Roland

Marcin Erdmann

unread,
Jan 3, 2018, 4:42:22 PM1/3/18
to Geb User Mailing List
Assuming that you want to setup the proxy to be used by RemoteWebDriver which is the mechanism used to connect and drive browsers at SauceLabs then the best option would probably be to set these system properties for all test tasks which execute tests using browsers at SauceLabs. In your build:

sauceLabs {
    task {
        systemProperties(
            'http.proxyHost': 'proxy.bechtle.de',
            'http.proxyPort': '80',
            'https.proxyHost': 'proxy.bechtle.de'
            'https.proxyPort': '443'
        )
    }
}

--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/687b3acc-3982-4c7d-9328-bab2c706be10%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages