Package org.openqa.selenium.server.browserlaunchers

Source Code of org.openqa.selenium.server.browserlaunchers.OperaCustomProfileLauncherUnitTest

package org.openqa.selenium.server.browserlaunchers;

import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.openqa.selenium.server.BrowserConfigurationOptions;
import org.openqa.selenium.server.RemoteControlConfiguration;

import java.io.File;

public class OperaCustomProfileLauncherUnitTest {

  @Test
  public void constructor_triesToFindBrowserLocationIfNullSpecified() throws Exception {
    RemoteControlConfiguration remoteConfiguration = new RemoteControlConfiguration();
    BrowserConfigurationOptions browserOptions = new BrowserConfigurationOptions();
   
    OperaCustomProfileLauncher launcher = new OperaCustomProfileLauncher(browserOptions, remoteConfiguration, "session", null) {
      @Override
      protected File locateBinaryInPath(String commandPath) {
        return null;
      }
     
      @Override
      protected String findBrowserLaunchLocation() {
        return "location";
      }
    };
   
    assertEquals("location", launcher.getCommandPath());
     
  }
}
TOP

Related Classes of org.openqa.selenium.server.browserlaunchers.OperaCustomProfileLauncherUnitTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.