2017-05-07 2 views
1
  • Ranorex 7.0.1, version d'évaluation, 28 jours laissé
  • OS, Windows 10
  • pilote Chrome, 2,29
  • Sélénium WebDriver serveur autonome, 3.4 .0

J'ai configuré Endpoint comme Selenium WebDriver local, sa connexion a été testée comme "Connecté".Ranorex ne peut pas démarrer le navigateur Chrome, pas d'avertissement ou d'erreur

WebDriver, WebDriver.Support ont été ajoutés aux références.

L'extrait de code est indiqué ci-dessous:

namespace HoT 
{ 
    class Program 
    { 
     [STAThread] 
     public static int Main(string[] args) 
     { 
      // Uncomment the following 2 lines if you want to automate Windows apps 
      // by starting the test executable directly 
      //if (Util.IsRestartRequiredForWinAppAccess) 
      // return Util.RestartWithUiAccess(); 

      Keyboard.AbortKey = System.Windows.Forms.Keys.Pause; 
      int error = 0; 
      var webDriver = new ChromeDriver(@"C:\Users\myName\Documents\Ranorex\RanorexStudio Projects\HoT\HoT\ExternalModules\chromedriver"); 
      webDriver.Navigate().GoToUrl("http://www.google.com"); 

      try 
      { 
       error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine); 
      } 
      catch (Exception e) 
      { 
       Report.Error("Unexpected exception occurred: " + e.ToString()); 
       error = -1; 
      } 
      return error; 
     } 
    } 
} 

Tout ce que je suis arrivé est une fenêtre de console et une fenêtre pop-up, il n'y a pas d'instance de navigateur Chrome ou un avertissement ou une erreur. Quelqu'un sait pourquoi?

enter image description here

Répondre

1

Vous devez démarre le navigateur

Host.Current.OpenBrowser ("http://www.google.com", "Chrome", "", faux, faux, faux, faux, faux);