Ejemplo n.º 1
0
        public void ChromeOpenTest()
        {
            var    prev = Process.GetProcessesByName("chrome");
            Chrome c    = new Chrome(remoteDebuggingPort: 9991);
            var    post = Process.GetProcessesByName("chrome");

            Assert.IsTrue(post.Length > prev.Length, "No chrome processes were created on the initialization of a Chrome instance");
            c.Dispose();
        }
Ejemplo n.º 2
0
        public async Task SessionCreationTest()
        {
            Chrome c = new Chrome(remoteDebuggingPort: 9992, headless: false);

            var currentSessions = await c.GetActiveSessions();

            var s = await c.CreateNewSession();

            var newSessions = await c.GetActiveSessions();

            Assert.IsTrue(currentSessions.Count() + 1 == newSessions.Count(), "The number of sessions before creation + 1 was not equal to the sessions found later");
            c.Dispose();
        }
 public void StopWebServer()
 {
     _webserver.Stop();
     _chrome.Dispose();
 }
Ejemplo n.º 4
0
 public void Cleanup()
 {
     chrome.Dispose();
     chrome = null;
 }