/*
 * Copyright 2016-2017 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package de.vorb.platon;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.net.MalformedURLException;
import java.net.URL;

@Configuration
@EnableAutoConfiguration
@PropertySource("classpath:config/application.properties")
public class SpringUiIntegrationTestConfig {

    @Bean
    public WebDriver webDriver() throws MalformedURLException {
        return new RemoteWebDriver(getRemoteUrl(), getDesiredCapabilities());
    }

    private DesiredCapabilities getDesiredCapabilities() {
        return DesiredCapabilities.firefox();
    }

    private URL getRemoteUrl() throws MalformedURLException {
        return new URL("http://localhost:4444/wd/hub");
    }

}

@@ -1089,16 +1089,54 @@
 net.URL;
+%0Aimport java.util.concurrent.TimeUnit;
 %0A%0A@Confi
@@ -1352,30 +1352,51 @@
 n %7B%0A        
-return
+final WebDriver webDriver =
  new RemoteW
@@ -1447,16 +1447,124 @@
 ies());%0A
+        webDriver.manage().timeouts().implicitlyWait(500, TimeUnit.MILLISECONDS);%0A        return webDriver;%0A
     %7D%0A%0A 

Configure implicit waiting of Selenium WebDriver