@@ -0,0 +1,2074 @@
+/*%0A * Copyright 2015 www.seleniumtests.com%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A * http://www.apache.org/licenses/LICENSE-2.0%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.seleniumtests.browserfactory;%0A%0Aimport com.seleniumtests.driver.DriverConfig;%0Aimport io.appium.java_client.ios.IOSDriver;%0Aimport org.openqa.selenium.UnsupportedCommandException;%0Aimport org.openqa.selenium.WebDriver;%0A%0Aimport java.io.IOException;%0Aimport java.net.MalformedURLException;%0Aimport java.net.URL;%0Aimport java.util.concurrent.TimeUnit;%0A%0A/**%0A * IPhone Driver Factory%0A */%0Apublic class IPhoneDriverFactory extends AbstractWebDriverFactory implements IWebDriverFactory %7B%0A%0A    public IPhoneDriverFactory(final DriverConfig webDriverConfig) %7B%0A        super(webDriverConfig);%0A    %7D%0A%0A    protected WebDriver createNativeDriver() throws MalformedURLException %7B%0A%0A        return new IOSDriver(new URL(webDriverConfig.getAppiumServerURL()), new IPhoneCapabilitiesFactory()%0A                    .createCapabilities(webDriverConfig));%0A    %7D%0A%0A    @Override%0A    public WebDriver createWebDriver() throws IOException %7B%0A        DriverConfig cfg = this.getWebDriverConfig();%0A%0A        driver = createNativeDriver();%0A%0A        setImplicitWaitTimeout(cfg.getImplicitWaitTimeout());%0A        if (cfg.getPageLoadTimeout() %3E= 0) %7B%0A            setPageLoadTimeout(cfg.getPageLoadTimeout());%0A        %7D%0A%0A        this.setWebDriver(driver);%0A        return driver;%0A    %7D%0A%0A    protected void setPageLoadTimeout(final long timeout) %7B%0A        try %7B%0A            driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS);%0A        %7D catch (UnsupportedCommandException e) %7B%0A        %7D%0A    %7D%0A%0A%7D%0A

add Iphone driver factory