How to set baseURL when launching an electron app?

23 views
Skip to first unread message

博刘

unread,
Feb 5, 2018, 2:19:44 AM2/5/18
to Geb User Mailing List
I have an electron app which will access website B at startup. 

I could do config in GebConfig.groovy to launch the electron app as below. Then after Geb running, it will launch the app first, and seems to re-direct to baseURL soon because the page will refresh soon when it starts up (currently the baseURL is the same with that in electron app, i.e. website B). If I leave baseURL to empty or other website, it will report "unhandled inspector error: {"code":-32000,"message":"Cannot navigate to invalid URL"}". Just want to ensure we need to use the same baseURL between GebConfig.groovy and electron app?

driver = {
ChromeOptions options = new ChromeOptions()
options.setBinary("path to electron app")
DesiredCapabilities capabilities = new DesiredCapabilities()
capabilities.setCapability(ChromeOptions.CAPABILITY, options)
new ChromeDriver(capabilities)
}
Reply all
Reply to author
Forward
0 new messages