Are you sure you are running in the "firefox" geb environment? The easiest
way to verify would be to simply throw an exception from the driver closure
(e.g. driver = { throw new Exception("Yes, running in firefox environment")
}), run again and see failures with the exception message.

On Tue, Oct 29, 2019 at 5:47 PM GebUser <[email protected]> wrote:

> It worked fine after setting system property:
>
> systemProperty 'webdriver.firefox.bin', 
> "C:\\Users\\rnatesan\\PortableApps\\FirefoxPortable\\App\\Firefox64\\firefox.exe"
>
>
>
> But it is not opening in maximized window mode even though I have it like
> this:
>
>
> firefox {
>   FirefoxOptions options = new FirefoxOptions();
>   options.setCapability("javascriptEnabled", true);
>   options.setCapability("acceptInsecureCerts", true);
>   driver = { def tmpDriver = new FirefoxDriver(options)
> *         tmpDriver.manage().window().maximize()*
>          return tmpDriver }
> }
>
>
>
>
>
>
> On Monday, October 28, 2019 at 3:39:33 PM UTC-4, Ben Frey wrote:
>>
>> Not sure if it'll work similarly for Firefox, but I for Chromedriver I
>> put it inside my project and did this:
>> System.setProperty('webdriver.chrome.driver',
>> 'src/test/resources/chromedriver')
>> driver = { new ChromeDriver() }
>>
>>
>> On Monday, October 28, 2019 at 2:20:48 PM UTC-5, GebUser wrote:
>>>
>>> hi,
>>>
>>> how do you set Portable Firefox as default browser for your Geb tests? I
>>> tried the following in GebConfig.groovy and it still picked up the default
>>> firefox binary location "C:\\Program Files\\Mozilla Firefox\\firefox.exe"
>>>
>>> .
>>>
>>>
>>> firefox {
>>>
>>>   FirefoxProfile profile = new FirefoxProfile();
>>>
>>>
>>>   FirefoxOptions options = new FirefoxOptions();
>>>   options.setCapability("javascriptEnabled", true);
>>>   options.setCapability("acceptInsecureCerts", true);
>>>   driver = {
>>>     def tmpDriver = new FirefoxDriver(new 
>>> GeckoDriverService.Builder().usingFirefoxBinary(new FirefoxBinary(new 
>>> File("C:\\Users\\rnatesan\\Downloads\\FirefoxPortable" +
>>>                 "\\FirefoxPortable.exe"))).build(), options)
>>>          tmpDriver.manage().window().maximize()
>>>          return tmpDriver }
>>>
>>>
>>>
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Ramesh
>>>
>>> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/155d52fe-ba47-429a-a771-8f978675ae3a%40googlegroups.com
> <https://groups.google.com/d/msgid/geb-user/155d52fe-ba47-429a-a771-8f978675ae3a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQSNk8HEyCKzto13R_P5p%2BDGZGaBEtddcpMGhdMvFZeZ4Q%40mail.gmail.com.

Reply via email to