Exemple #1
0
 public IWebDriver Create(string url, Cookie cookie = null)
 {
     driverService.HideCommandPromptWindow = true;
     try
     {
         var driver = new PhantomJSDriver(driverService);
         try
         {
             if (cookie != null)
             {
                 driver.Manage().Cookies.AddCookie(cookie);
             }
         }
         catch (Exception exc)
         {
         }
         driver.Manage().Timeouts().SetPageLoadTimeout(new TimeSpan((long)120E7));
         driver.Navigate().GoToUrl(url);
         return(driver);
     }
     catch (Exception exc)
     {
         Console.WriteLine("err when navigate to : ");
         Console.WriteLine(exc.Message);
     }
     return(null);
 }
        private void LoginButton_Click(object sender, RoutedEventArgs e)
        {
            if (User.Text == "" || Password.Password == "")
            {
                MessageBox.Show("Insert user and password");
                return;
            }

            PhantomJSDriverService srv = PhantomJSDriverService.CreateDefaultService();

            srv.SuppressInitialDiagnosticInformation = true;
            srv.HideCommandPromptWindow = true;
            using (PhantomJSDriver chrDriver = new PhantomJSDriver(srv))
            {
                try
                {
                    chrDriver.Manage().Window.Minimize();
                }
                catch (Exception ex)
                {
                    //Evbb
                }
                chrDriver.Url = "https://idp.polito.it/idp/x509mixed-login";
                chrDriver.Navigate();
                IWebElement element = chrDriver.FindElementById("j_username");
                element.SendKeys(User.Text);
                element = chrDriver.FindElementById("j_password");
                element.SendKeys(Password.Password);
                element = chrDriver.FindElementsByTagName("button").Where((x) =>
                {
                    try
                    {
                        x.FindElement(By.Id("usernamepassword"));
                        return(true);
                    }
                    catch (Exception ex)
                    {
                        return(false);
                    }
                }).First();

                element.Click();
                chrDriver.Url = "https://didattica.polito.it/portal/page/portal/home/Studente";
                chrDriver.Navigate();
                if (chrDriver.Manage().Cookies.GetCookieNamed("ShibCookie") != null)
                {
                    chrDriver.Manage().Cookies.AllCookies.ToList()
                    .ForEach(x =>
                             jar.Add(new System.Net.Cookie(x.Name, x.Value, x.Path, x.Domain)));
                    this.DialogResult = true;
                }
                else
                {
                    jar = null;
                    this.DialogResult = false;
                }
                this.Close();
            }
        }
        public IWebDriver CreateWebDriver()
        {
            var driver = new PhantomJSDriver();

            driver.Manage().Timeouts().ImplicitlyWait(new TimeSpan(5));
            driver.Manage().Window.Maximize();
            return(driver);
        }
Exemple #4
0
        /// <summary>
        /// Получить драйвер IWebDriver по имени
        /// </summary>
        /// <param name="driverName"></param>
        /// <returns></returns>
        public IWebDriver GetDriver(string driverName)
        {
            IWebDriver driver = null;

            switch (driverName)
            {
            case "Firefox":
                FirefoxProfile firefoxProfile = new FirefoxProfile();
                firefoxProfile.SetPreference("browser.download.folderList", 2);
                firefoxProfile.SetPreference("browser.download.dir", GetDownloadPath());
                firefoxProfile.SetPreference("browser.helperApps.neverAsk.saveToDisk", "application/xml");
                firefoxProfile.SetPreference("browser.helperApps.alwaysAsk.force", false);
                driver = new FirefoxDriver(firefoxProfile);
                break;

            case "Chrome":
                ChromeOptions chromeOptions = new ChromeOptions();
                chromeOptions.AddUserProfilePreference("download.default_directory", GetDownloadPath());
                chromeOptions.AddUserProfilePreference("intl.accept_languages", "nl");
                chromeOptions.AddUserProfilePreference("disable-popup-blocking", "true");
                chromeOptions.AddUserProfilePreference("download.prompt_for_download", false);
                chromeOptions.AddUserProfilePreference("download.directory_upgrade", true);
                chromeOptions.AddUserProfilePreference("safebrowsing.enabled", true);
                driver = new ChromeDriver(chromeOptions);
                break;

            case "IE":
                var options = new InternetExplorerOptions
                {
                    EnsureCleanSession = true,
                    IgnoreZoomLevel    = true,
                    IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                };
                driver = new InternetExplorerDriver(options);
                break;

            case "PhantomJS":
                var phantomJsOptions = new PhantomJSOptions();
                phantomJsOptions.AddAdditionalCapability("phantomjs.page.settings.userAgent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.94 Safari/537.36");

                var driverService = PhantomJSDriverService.CreateDefaultService();
                driverService.IgnoreSslErrors = true;
                driverService.SslProtocol     = "any";
                driver = new PhantomJSDriver(driverService, phantomJsOptions);
                break;
            }
            if (driver != null)
            {
                driver.Manage().Cookies.DeleteAllCookies();
                driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(30);
                driver.Manage().Timeouts().AsynchronousJavaScript = TimeSpan.FromSeconds(3);
                driver.Manage().Timeouts().ImplicitWait           = TimeSpan.FromMilliseconds(200);
            }

            return(driver);
        }
 static void Main(string[] args)
 {
     driver = new PhantomJSDriver();
     driver.Manage().Window.Maximize();
     Console.WriteLine(driver.Manage().Window.Size);
     driver.Navigate().GoToUrl("https://google.com/");
     driver.GetScreenshot().SaveAsFile("screenshot.png", ImageFormat.Png);
     driver.Quit();
     Console.Read();
 }
Exemple #6
0
 public void AddCookie(string cookies, string domain)
 {
     string[] cookielist = cookies.Split(';');
     for (int i = 0; i < cookielist.Length; i++)
     {
         string   cookie    = cookielist[i];
         string[] cookieVal = cookie.Split('=');
         Cookie   ck        = new Cookie(cookieVal[0], cookieVal[1], domain, "/", null);
         _webDriver.Manage().Cookies.AddCookie(ck);
     }
 }
Exemple #7
0
        public static PhantomJSDriver GetPhantomJsDriver()
        {
            var driverService = PhantomJSDriverService.CreateDefaultService();

            driverService.HideCommandPromptWindow = true;
            var phantomJsDriver = new PhantomJSDriver(driverService);

            phantomJsDriver.Manage().Window.Size = new Size(1120, 550);
            phantomJsDriver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));
            phantomJsDriver.Manage().Timeouts().SetScriptTimeout(TimeSpan.FromSeconds(3));
            return(phantomJsDriver);
        }
Exemple #8
0
        protected static IWebDriver LaunchWebDriver(string url, TargetBrowser targetBrowser = TargetBrowser.InternetExplorer, int width = 1024, int height = 768)
        {
            IWebDriver browser = null;

            switch (targetBrowser)
            {
            case TargetBrowser.InternetExplorer:
                var ieOptions = new InternetExplorerOptions
                {
                    IntroduceInstabilityByIgnoringProtectedModeSettings = true,
                    EnsureCleanSession = true
                };
                browser = new InternetExplorerDriver(ieOptions);
                break;

            case TargetBrowser.Edge:
                var edgeOptions = new EdgeOptions
                {
                    PageLoadStrategy = EdgePageLoadStrategy.Eager
                };
                browser = new EdgeDriver(edgeOptions);
                break;

            case TargetBrowser.Chrome:
                browser = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location));
                break;

            case TargetBrowser.Firefox:
                browser = new FirefoxDriver();
                break;

            case TargetBrowser.Safari:
                browser = new SafariDriver();
                break;

            case TargetBrowser.PhantomJSDriver:
                browser = new PhantomJSDriver();
                break;

            default:
                throw new ArgumentException($"Unknown target browser type {targetBrowser}");
            }

            browser.Manage().Window.Size = new Size(width, height);
            browser.Manage().Timeouts().ImplicitWait           = TimeSpan.FromSeconds(30);
            browser.Manage().Timeouts().PageLoad               = TimeSpan.FromSeconds(30);
            browser.Manage().Timeouts().AsynchronousJavaScript = TimeSpan.FromSeconds(30);

            browser.Navigate().GoToUrl(url);

            return(browser);
        }
Exemple #9
0
        void pullData(string inputURL, string sportName)
        {
            Console.WriteLine("Starting Pull of " + inputURL);
            PhantomJSDriverService service = PhantomJSDriverService.CreateDefaultService("..\\..\\packages\\PhantomJS.2.1.1\\tools\\phantomjs");

            service.IgnoreSslErrors        = true;
            service.SslProtocol            = "any";
            service.LocalToRemoteUrlAccess = true;
            //service.AddArgument("--ignore-ssl-errors=true");
            // service.AddArgument("--ssl-protocol=tlsv1");
            //service.GhostDriverPath = "E:\\SportsBetting\\packages\\PhantomJS.2.1.1\\tools\\phantomjs";
            //PhantomJSDriver driver = new PhantomJSDriver("E:\\SportsBetting\\packages\\PhantomJS.2.1.1\\tools\\phantomjs");
            PhantomJSDriver driver = new PhantomJSDriver(service);

            driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(10));
            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));
            //driver.Url = inputURL;

            string source = "";

            try
            {
                driver.Navigate().GoToUrl(inputURL);

                if (targetLink != "")
                {
                    //Console.WriteLine("here");

                    //var firstNext = driver.FindElementByCssSelector(dropDownLink);
                    //firstNext.Click();
                    //Thread.Sleep(5000);

                    var next = driver.FindElementById(targetLink);

                    next.Click();

                    Thread.Sleep(10000);
                }

                source = driver.PageSource;
            }
            catch (Exception e)
            {
                Helper.writeError(e.ToString(), (fileName + sportName));
            }

            Helper.writePulledData(source, (fileName + sportName));
            driver.Quit();

            Console.WriteLine("Data pulled");
        }
        private bool TryDownloadFile(CaseDocument case_doc)
        {
            try
            {
                ServicePointManager.Expect100Continue = true;
                ServicePointManager.SecurityProtocol  = SecurityProtocolType.Tls12;
                // create HttpWebRequest
                Uri            uri     = new Uri(case_doc.D_URL);
                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(uri);
                request.ProtocolVersion = HttpVersion.Version10;

                // insert cookies
                request.CookieContainer = new CookieContainer();
                foreach (OpenQA.Selenium.Cookie c in driver.Manage().Cookies.AllCookies)
                {
                    System.Net.Cookie cookie =
                        new System.Net.Cookie(c.Name, c.Value, c.Path, c.Domain);
                    request.CookieContainer.Add(cookie);
                }

                // download file
                using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
                    using (Stream responseStream = response.GetResponseStream())
                    {
                        if (!response.ContentType.Contains("tiff"))
                        {
                            Console.WriteLine(response.ContentType);
                            return(false);
                        }
                        string ext = "." + response.ContentType;
                        using (FileStream fileStream = File.Create(case_doc.fileName + ".tif"))
                        {
                            var buffer = new byte[4096];
                            int bytesRead;

                            while ((bytesRead = responseStream.Read(buffer, 0, buffer.Length)) > 0)
                            {
                                fileStream.Write(buffer, 0, bytesRead);
                            }
                            case_doc.downloaded = true;
                        }
                    }

                return(true);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
                return(false);
            }
        }
        protected override object StartDriver(int pageLoadTimeout = 60, int scriptTimeout = 60, bool isMaximize = false)
        {
            PhantomJSOptions op = (PhantomJSOptions)Drivers.DriverOptions;

            if (op == null)
            {
                op = new PhantomJSOptions();
            }
            PhantomJSDriver driver = new PhantomJSDriver(Drivers.PhantomJSDriverService, op);

            driver.Manage().Timeouts().SetPageLoadTimeout(System.TimeSpan.FromSeconds(pageLoadTimeout));
            driver.Manage().Timeouts().SetScriptTimeout(System.TimeSpan.FromSeconds(scriptTimeout));
            return(driver);
        }
        private static IWebDriver InitializePhantomJsDriver()
        {
            var service = PhantomJSDriverService.CreateDefaultService();

            service.HideCommandPromptWindow = true;
            service.LoadImages = false;
            service.ProxyType  = "none";

            var driver = new PhantomJSDriver(service);

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromMinutes(Convert.ToInt32(_waitTimeInMinutes)));
            driver.Manage().Window.Maximize();
            driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromMinutes(Convert.ToInt32(_setPageLoadTimeout)));

            return(driver);
        }
Exemple #13
0
        private System.Net.Cookie SetUpPhantomJS(string link)
        {
            System.Net.Cookie cookie = new System.Net.Cookie();

            // PhantomJS seems to only work with .NET 4.5 or below.

            PhantomJSOptions options = new PhantomJSOptions();

            options.AddAdditionalCapability("IsJavaScriptEnabled", true);
            PhantomJSDriver driver = new PhantomJSDriver(options);

            // https://stackoverflow.com/questions/46666084/how-to-deal-with-javascript-when-fetching-http-response-in-c-sharp-using-httpweb
            // https://riptutorial.com/phantomjs
            driver.Url = link;
            driver.Navigate();

            var cookies = driver.Manage().Cookies.AllCookies;

            foreach (var c in cookies)
            {
                if (c.Name.Equals("TSPD_101"))
                {
                    cookie.Name    = c.Name;
                    cookie.Domain  = c.Domain;
                    cookie.Value   = c.Value;
                    cookie.Path    = c.Path;
                    cookie.Expires = DateTime.Now.AddHours(6);
                }
            }

            driver.Close();
            driver.Dispose();

            return(cookie);
        }
        public IWebDriver Create(string url)
        {
            lock (this)
            {
                var driverService = PhantomJSDriverService.CreateDefaultService();
                if (portCache.Contains(driverService.Port))
                {
                    driverService.Port = portCache.Max() + 1;
                }
                else
                {
                    portCache.Add(driverService.Port);
                }

                driverService.HideCommandPromptWindow = true;
                try
                {
                    var driver = new PhantomJSDriver(driverService);
                    driver.Manage().Timeouts().PageLoad = new TimeSpan((long)120E7);
                    driver.Navigate().GoToUrl(url);
                    return(driver);
                }
                catch (Exception exc)
                {
                    Console.WriteLine("err when navigate to : ");
                    Console.WriteLine(exc.Message);
                }
            }
            return(null);
        }
Exemple #15
0
        public void TestPhantomJs()
        {
            IWebDriver driver = null;

            try
            {
                PhantomJSOptions options = new PhantomJSOptions();

                driver     = new PhantomJSDriver();
                driver.Url = "http://www.softpost.org";
                driver.Manage().Window.Maximize();
                Console.WriteLine("Title is " + driver.Title);

                driver.Navigate();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception ....*********" + e.ToString());
            }

            finally
            {
                Thread.Sleep(2000);
                driver.Close();
                driver.Quit();
            }
        }
Exemple #16
0
        static public void getItems(ref TimeStamp cTimestep)
        {
            var service = PhantomJSDriverService.CreateDefaultService();
            var phantomJSDriverService = PhantomJSDriverService.CreateDefaultService(@"C:\phantomjs-2.1.1-windows\bin");

            using (PhantomJSDriver driver = new PhantomJSDriver(phantomJSDriverService))
            {
                driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
                driver.Url = @"http://www.finanzen.net/anleihen/" + cTimestep.link;
                driver.Navigate();
                //Console.WriteLine(driver.PageSource);
                try
                {
                    IWebElement element = driver.FindElement(By.ClassName("col-xs-5"));
                    cTimestep.lastprice = Convert.ToDouble(element.Text.Replace(",", ".").Replace("-", "0").Replace("%", null).Replace("±", null));
                    element             = driver.FindElement(By.ClassName("col-xs-4"));
                    cTimestep.change    = Convert.ToDouble(element.Text.Replace(",", String.Empty).Replace("-", "0").Replace("+", null).Replace("±", null));
                    element             = driver.FindElement(By.ClassName("col-xs-3"));
                    cTimestep.pctChange = Convert.ToDouble(element.Text.Replace(",", ".").Replace("-", "0").Replace("%", null).Replace("+", null).Replace("±", null));
                    cTimestep.high      = cTimestep.lastprice;
                    cTimestep.low       = cTimestep.lastprice;
                    cTimestep.timestamp = DateTime.Now;
                }
                catch (Exception e)
                {
                    throw new Exception("Problem getting the input" + e + " \n WITH" + cTimestep.id);
                }
            }
        }
Exemple #17
0
        void pullData(string inputURL, string sportName)
        {
            Console.WriteLine("Starting Pull of " + inputURL);
            PhantomJSDriverService service = PhantomJSDriverService.CreateDefaultService("..\\..\\packages\\PhantomJS.2.1.1\\tools\\phantomjs");

            service.IgnoreSslErrors = true;
            service.SslProtocol     = "any";
            PhantomJSDriver driver = new PhantomJSDriver(service);

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));

            string source = "";

            try
            {
                driver.Navigate().GoToUrl(inputURL);
                driver.FindElementByClassName("timezone");

                source = driver.PageSource;
            }
            catch (Exception e)
            {
                Helper.writeError(e.ToString(), (fileName + sportName));
            }

            Helper.writePulledData(source, (fileName + sportName));
            driver.Quit();

            Console.WriteLine("Data pulled");
        }
Exemple #18
0
        private void createMapTileScreenshots(string nodeId, string latitude, string longitude)
        {
            String pathScreenshots = System.IO.Path.GetDirectoryName(System.AppDomain.CurrentDomain.BaseDirectory) + Path.DirectorySeparatorChar + "screenshots" + Path.DirectorySeparatorChar;

            Console.WriteLine("Screenshots Path: " + pathScreenshots);
            try
            {
                // setting for proxy
                //PhantomJSOptions phOptions = new PhantomJSOptions();
                //phOptions.AddAdditionalCapability(CapabilityType.Proxy, "cache.itb.ac.id");

                // hide cmd windows of phantomsjs
                var driverService = PhantomJSDriverService.CreateDefaultService();
                driverService.HideCommandPromptWindow = true;

                // initiate phantomjs driver
                PhantomJSDriver phantom;
                phantom = new PhantomJSDriver(driverService);
                // setting the default timeout to 30 seconds
                phantom.Manage().Timeouts().ImplicitlyWait(new TimeSpan(0, 0, 30));
                string screenshotUrl = "http://localhost/bsts_routing/tilegen/v2/index.php?latitude=" + latitude + "&longitude=" + longitude;
                phantom.Navigate().GoToUrl(screenshotUrl);

                // grab the snapshot
                Screenshot sh        = phantom.GetScreenshot();
                TimeUtils  timeUtils = new TimeUtils();
                string     fileName  = nodeId + "_" + Convert.ToString(timeUtils.ToUnixTime(DateTime.Now)) + ".png";
                sh.SaveAsFile(pathScreenshots + fileName, ImageFormat.Png);
                phantom.Quit();
            }
            catch (Exception error)
            {
                Console.WriteLine(error.Message);
            }
        }
        static void TestPhantom()
        {
            var driverService = PhantomJSDriverService.CreateDefaultService();

            driverService.HideCommandPromptWindow = true;

            var driver = new PhantomJSDriver(driverService);

            driver.Url = "https://www.kak-noviy.ru/sell/phones/apple/iphone-5/64gb-white";
            driver.Manage().Window.Size = new System.Drawing.Size(1920, 1080);
            driver.Navigate();

            var source = driver.PageSource;
            var label1 = driver.FindElementByXPath("//label[text()='Как новый']");
            var label2 = driver.FindElementByXPath("//label[text()='Устройство полностью исправно']");
            var label3 = driver.FindElementByXPath("//label[text()='Полная комплектация']");
            var label4 = driver.FindElementByXPath("//label[text()='Блокировки отсутствуют']");

            label1.Click();
            label2.Click();
            label3.Click();
            label4.Click();
            WaitForAjax(driver);
            driver.GetScreenshot().SaveAsFile("test.png", System.Drawing.Imaging.ImageFormat.Png);
            var price = driver.FindElementByClassName("price");

            Console.WriteLine(price.Text);
            driver.Close();
            driver.Quit();
        }
        private void PerformSeleniumTests(VisualTesterBase visualTester, Action <IWebDriver> performTests)
        {
            var driver = new PhantomJSDriver();

            driver.Manage().Window.Size = new Size(1280, 980);

            try
            {
                visualTester.Initialize(driver);

                performTests(driver);

                visualTester.Close();
            }
            catch (Exception ex)
            {
                visualTester.Exception(driver);
                Console.WriteLine(ex);
            }
            finally
            {
                driver.Quit();
                visualTester.FinalizeTest();
            }
        }
        /// <summary>
        /// Método responsável por realizar o login no linkedin
        /// </summary>
        /// <returns>PhantomJSDriver logado</returns>
        private static PhantomJSDriver RealizaLogin()
        {
            var options = new PhantomJSOptions();

            options.AddAdditionalCapability("permissions.default.stylesheet", 2);
            options.AddAdditionalCapability("permissions.default.image", 2);
            options.AddAdditionalCapability("phantomjs.page.settings.userAgent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/35.0");

            var loPhantom = new PhantomJSDriver(options);
            var time      = 20;

            loPhantom.Manage().Window.Size = new Size(2000, 2000);
            loPhantom.Navigate().GoToUrl("https://www.linkedin.com/uas/login?goback=&trk=hb_signin");

            var loginForm = loPhantom.FindElementByName("session_key");
            var passForm  = loPhantom.FindElementByName("session_password");
            var loButton  = loPhantom.FindElementByName("signin");

            loginForm.Clear();
            passForm.Clear();
            loginForm.SendKeys(""); //Login
            passForm.SendKeys("");  //Senha

            loButton.Click();

            var wait = new WebDriverWait(loPhantom, TimeSpan.FromSeconds(time));

            wait.Until(drv => drv.Url.Contains("feed"));

            return(loPhantom);
        }
Exemple #22
0
 public AtsService()
 {
     LogHelper.WriteLine("Phantom Başlatılıyor!");
     driver = new PhantomJSDriver();
     driver.Manage().Window.Size = new Size(1600, 900);
     LogHelper.WriteLine("Phantom Başlatıldı!");
 }
Exemple #23
0
 static void Main(string[] args)
 {
     using (var driver = new PhantomJSDriver())
     {
         driver.Manage().Window.Maximize();
         var           saveDir = $"SaveImgs/";
         StringBuilder builder = new StringBuilder();
         foreach (var item in pagesConfig)
         {
             try
             {
                 Console.WriteLine($"开始前往{item.Key}首页:{item.Value}");
                 if (!Directory.Exists(saveDir))
                 {
                     Directory.CreateDirectory(saveDir);
                 }
                 driver.Navigate().GoToUrl(item.Value);
                 var saveName = $"{item.Key}.jpg";
                 var savePath = $"{ saveDir }/{ saveName}";
                 ((ITakesScreenshot)driver).GetScreenshot().SaveAsFile(savePath, ScreenshotImageFormat.Jpeg);
                 builder.AppendLine($"### {item.Key}");
                 builder.AppendLine($"![图片](./{saveName})");
                 Console.WriteLine($"图片保存至:{savePath}");
             }
             catch (Exception ex)
             {
                 Console.WriteLine(item.Key + "" + ex.Message);
             }
         }
         //创建MD文件
         Utils.FileHelper.WriteFile(builder.ToString(), $"{saveDir}/README.MD");
         driver.Quit();
     }
 }
        public Locate()
        {
            var service = PhantomJSDriverService.CreateDefaultService(Environment.CurrentDirectory);

            service.WebSecurity             = false;
            service.HideCommandPromptWindow = true;
            driver = new PhantomJSDriver(service);
            driver.Manage().Window.Size = new System.Drawing.Size(1240, 1240);

            //var chromeOptions = new ChromeOptions();
            //chromeOptions.AddArguments("headless");
            //var chromeDriverService = ChromeDriverService.CreateDefaultService();
            //// chromeDriverService.HideCommandPromptWindow = true;
            //driver = new ChromeDriver(chromeDriverService,chromeOptions);

            //driver.Navigate().GoToUrl("https://facebook.com");
            //Thread.Sleep(3000);
            //Console.WriteLine(driver.WindowHandles.Count);
            //driver.ExecuteScript("window.open('https://google.com','_blank');");
            //Thread.Sleep(3000);
            //Console.WriteLine(driver.WindowHandles.Count);

            Console.WriteLine(driver.Capabilities.ToString());
            SignInUrl    = "https://www.clarkcountycourts.us/Portal/Account/Login";
            SignInUrl1   = "https://odysseyadfs.tylertech.com/IdentityServer/account/signin?ReturnUrl=%2fIdentityServer%2fissue%2fwsfed%3fwa%3dwsignin1.0%26wtrealm%3dhttps%253a%252f%252fOdysseyADFS.tylertech.com%252fadfs%252fservices%252ftrust%26wctx%3d4d2b3478-8513-48ad-8998-2652d72a38e9%26wauth%3durn%253a46%26wct%3d2018-04-29T15%253a42%253a35Z%26whr%3dhttps%253a%252f%252fodysseyadfs.tylertech.com%252fidentityserver&wa=wsignin1.0&wtrealm=https%3a%2f%2fOdysseyADFS.tylertech.com%2fadfs%2fservices%2ftrust&wctx=4d2b3478-8513-48ad-8998-2652d72a38e9&wauth=urn%3a46&wct=2018-04-29T15%3a42%3a35Z&whr=https%3a%2f%2fodysseyadfs.tylertech.com%2fidentityserver";
            HomePageUrl  = "https://www.clarkcountycourts.us/Portal/";
            case_ref_num = new CrossRefNumber();
        }
        /// <summary>
        /// GetCookiesByUrl
        /// </summary>
        /// <param name="url"></param>
        /// <returns></returns>
        public static string GetCookiesByUrl(string url)
        {
            var userAgent =
                @"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.108 Safari/537.36 2345Explorer/8.6.2.15784";
            var options = new PhantomJSOptions();

            options.AddAdditionalCapability(@"phantomjs.page.settings.userAgent", userAgent);

            using (var driver = new PhantomJSDriver(options))
            {
                var navigation = driver.Navigate();
                navigation.GoToUrl(url);
                var    cookies       = driver.Manage().Cookies.AllCookies;
                string cookiesString = "";
                bool   isFirst       = true;
                foreach (var cookie in cookies)
                {
                    if (isFirst)
                    {
                        cookiesString += HttpHelper.GetFormatCookies(cookie.ToString());
                        isFirst        = false;
                    }
                    else
                    {
                        cookiesString = $"{cookiesString};{HttpHelper.GetFormatCookies(cookie.ToString())}";
                    }
                }
                Console.WriteLine($"cookies:{cookiesString}");
                return(cookiesString);
            }
        }
Exemple #26
0
        public IWebDriver CreateWebDriver()
        {
            var driver = new PhantomJSDriver();

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(3));
            return(driver);
        }
Exemple #27
0
        protected IWebDriver CreateWebDriver()
        {
            var driverName = GetTestProperty("webDriver");


            if (string.Compare(driverName, "chrome", StringComparison.InvariantCultureIgnoreCase) == 0)
            {
                var options = new ChromeOptions();
                options.AddArgument("-incognito ");
                options.AddArgument("--start-maximized");
                var location  = GetTestProperty("chromeDriverLocation");
                var webDriver = new ChromeDriver(location, options);
                return(webDriver);
            }
            else if (string.Compare(driverName, "phantomJs", StringComparison.InvariantCultureIgnoreCase) == 0)
            {
                var driver = new PhantomJSDriver();

                driver.Manage().Window.Size = new Size(1200, 1000);
                return(driver);
            }
            else
            {
                if (string.IsNullOrEmpty(driverName))
                {
                    throw new InvalidOperationException("Driver name missing: do you have selected a test setting file?");
                }
                throw new InvalidOperationException($"Invalid driver name: {driverName}");
            }
        }
Exemple #28
0
        void pullData(string inputURL, string sportName)
        {
            Console.WriteLine("Starting Pull of " + inputURL);
            PhantomJSDriverService service = PhantomJSDriverService.CreateDefaultService("..\\..\\packages\\PhantomJS.2.1.1\\tools\\phantomjs");

            service.IgnoreSslErrors        = true;
            service.SslProtocol            = "any";
            service.LocalToRemoteUrlAccess = true;
            //service.AddArgument("--ignore-ssl-errors=true");
            // service.AddArgument("--ssl-protocol=tlsv1");
            //service.GhostDriverPath = "E:\\SportsBetting\\packages\\PhantomJS.2.1.1\\tools\\phantomjs";
            //PhantomJSDriver driver = new PhantomJSDriver("E:\\SportsBetting\\packages\\PhantomJS.2.1.1\\tools\\phantomjs");
            PhantomJSDriver driver = new PhantomJSDriver(service);

            driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(20));
            //driver.Url = inputURL;

            string source = "";

            try
            {
                driver.Navigate().GoToUrl(inputURL);
                source = driver.PageSource;
            }
            catch (Exception e)
            {
                Helper.writeError(e.ToString(), (fileName + sportName));
            }

            Helper.writePulledData(source, (fileName + sportName));
            driver.Quit();

            Console.WriteLine("Data pulled");
        }
Exemple #29
0
        static void Main(string[] args)
        {
            // web parser
            //BrowserDemo.OpenHtmlUnitDriver();
            // BrowserDemo.OpenPhantomJs();

            //TrackingDemo.TrackWithoutBrowser();
            //TrackingDemo.TrackWithChrome();

            // start http server
            //using (var server = new HttpServer("http://*****:*****@" <!DOCTYPE html><!--29175c33-bb68-31a4-a326-3fc888d22e35_v33--><html><head><meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;></meta><style id=&quot;DS3Style&quot; type=&quot;text/css&quot;>@media only screen and (max-width: 620px) {body[yahoo] .device-width {	width: 450px !important}body[yahoo] .threeColumns {	width: 140px !important}body[yahoo] .threeColumnsTd {	padding: 10px 4px !important}body[yahoo] .fourColumns {	width: 225px !important}body[yahoo] .fourColumnsLast {	width: 225px !important}body[yahoo] .fourColumnsTd {	padding: 10px 0px !important}body[yahoo] .fourColumnsPad {	padding: 0 0 0 0 !important}body[yahoo] .secondary-product-image {	width: 200px !important;	height: 200px !important}body[yahoo] .center {	text-align: center !important}body[yahoo] .twoColumnForty {	width: 200px !importantheight: 200px !important}body[yahoo] .twoColumnForty img {	width: 200px !important;	height: 200px !important}body[yahoo] .twoColumnSixty {	width: 228px !important}body[yahoo] .secondary-subhead-right {	display: none !important}body[yahoo] .secondary-subhead-left {	width: 450px !important}}@media only screen and (max-width: 479px) {body[yahoo] .navigation {	display: none !important}body[yahoo] .device-width {	width: 300px !important;	padding: 0}body[yahoo] .threeColumns {	width: 150px !important}body[yahoo] .fourColumns {	width: 150px !important}body[yahoo] .fourColumnsLast {	width: 150px !important}body[yahoo] .fourColumnsTd {	padding: 10px 0px !important}body[yahoo] .fourColumnsPad {	padding: 0 0 0 0 !important}body[yahoo] .secondary-product-image {	width: 240px !important;	height: 240px !important}body[yahoo] .single-product-table {	float: none !important;margin-bottom: 10px !important;margin-right: auto !important;margin-left: auto !important;}body[yahoo] .single-product-pad {	padding: 0 0 0 0 !important;}body[yahoo] .single-product-image {align:center;width: 200px !important;height: 200px !important}body[yahoo] .mobile-full-width {	width: 300px !important}body[yahoo] .twoColumnForty {align:center; !importantwidth: 200px !important}body[yahoo] .twoColumnForty img {}body[yahoo] .twoColumnSixty {padding-left: 0px !important;width: 300px !important}body[yahoo] .secondary-subhead-left {	width: 300px !important}body[yahoo] .ThreeColumnItemTable{        padding: 0px 0px 0px 74px !important}body[yahoo] .FourColumnFloater{float: right !important;}span.message-history{text-align: left !important;float: right !important;}}body[yahoo] .mobile-full-width {	min-width: 103px;max-width: 300px;height: 38px;}body[yahoo] .mobile-full-width a {	display: block;padding: 10px 0;}body[yahoo] .mobile-full-width td{	padding: 0px !important}td.wrapText{white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; }@-moz-document url-prefix() {td.wrapTextFF_Fix {display: inline-block}}body { width: 100% !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; -webkit-font-smoothing: antialiased !important; margin: 0 !important; padding: 0 0 100px !important; font-family: Helvetica, Arial, sans-serif !important; background-color:#f9f9f9}.ReadMsgBody { width: 100% !important; background-color: #ffffff !important; }.ExternalClass { width: 100% !important; }.ExternalClass { line-height: 100% !important; }img { display: block; outline: none !important; text-decoration: none !important; -ms-interpolation-mode: bicubic !important; }td{word-wrap: break-word;}</style><!--[if gte mso 9]>	<style>td.product-details-block{word-break:break-all}.threeColumns{width:140px !important}.threeColumnsTd{padding:10px 20px !important}.fourColumns{width:158px !important}.fourColumnsPad{padding: 0 18px 0 0 !important}.fourColumnsTd{padding:10px 0px !important}.twoColumnSixty{width:360px !important}table{mso-table-lspace:0pt; mso-table-rspace:0pt;}</style>	<![endif]--></head><body yahoo=&quot;fix&quot;><table id=&quot;area2Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><table width=&quot;600&quot; class=&quot;device-width header-logo&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#f9f9f9&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 0; border: none;&quot;><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 5px 0 10px 0; color: #333;&quot; align=&quot;left&quot;>New message: Hi Kobo,As a buyer, I am interest...</p></td></tr></table></td></tr></table> <table id=&quot;area3Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse:collapse !important;border-spacing:0 !important;border:none;background-color:#f9f9f9;&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse:collapse !important;border-spacing:0 !important;border:none;&quot;><table width=&quot;100%&quot; height=&quot;7&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-image: url(&apos;http://p.ebaystatic.com/aw/navbar/preHeaderBottomShadow.png&apos;); background-repeat: repeat-y no-repeat; margin: 0; padding: 0&quot;><!--[if gte mso 9]><v:rect xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; fill=&quot;true&quot; stroke=&quot;false&quot; style=&quot;mso-width-percent:1000;height:1px;&quot;><v:fill type=&quot;tile&quot; color=&quot;#dddddd&quot; /></v:rect><v:rect xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; fill=&quot;true&quot; stroke=&quot;false&quot; style=&quot;mso-width-percent:1000;height:6px;&quot;><v:fill type=&quot;tile&quot; src=&quot;http://p.ebaystatic.com/aw/navbar/preHeaderBottomShadow.png&quot; color=&quot;#f9f9f9&quot; /><div style=&quot;width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;&quot;><![endif]--><tr><td width=&quot;100%&quot; height=&quot;1&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #dddddd; font-size: 1px; line-height: 1px;&quot;><!--[if gte mso 15]>&amp;nbsp;<![endif]--></td></tr><tr><td width=&quot;100%&quot; height=&quot;6&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: none; font-size: 1px; line-height: 1px;&quot;>&amp;nbsp;</td></tr><!--[if gte mso 9]></div></v:rect><![endif]--></table></td></tr></table>   <table id=&quot;area4Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><table width=&quot;600&quot; class=&quot;device-width header-logo&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 15px 0 20px; border: none;&quot;><a href=&quot;http://rover.ebay.com/rover/0/e12050.m1831.l3127/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.com%2Flink%2F%3Fnav%3Dhome%26alt%3Dweb%26globalID%3DEBAY-ENCA%26referrer%3Dhttp%253A%252F%252Frover.ebay.com%252Frover%252F0%252Fe12050.m1831.l3127%252F7%253Feuid%253D68fe0bd048d04a84b6d8ef4046dde4cd%2526cp%253D1&quot; style=&quot;text-decoration: none; color: #0654ba;&quot;><img src=&quot;http://p.ebaystatic.com/aw/logos/header_ebay_logo_132x46.gif&quot; width=&quot;132&quot; height=&quot;46&quot; border=&quot;0&quot; alt=&quot;eBay&quot; align=&quot;left&quot; style=&quot;display: inline block; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; border: none;&quot; /></a><img src=&quot;http://rover.ebay.com/roveropen/0/e12050/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&quot; alt=&quot;&quot; style=&quot;border:0; height:1;&quot;/></td></tr></table></td></tr></table> <table id=&quot;area5Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; background-color:#f9f9f9&quot;>  <tr>    <td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>    <table id=&quot;PrimaryMessage&quot; width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#f9f9f9&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>      <tr><td valign=&quot;top&quot; class=&quot;secondary-headline&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 20px 0 5px;&quot;><h1 style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 15px; color: #808284; text-align: left; font-size: 13px; margin: 0 0 4px;&quot; align=&quot;left&quot;>New message from:<a href=&quot;http://rover.ebay.com/rover/0/e12050.m44.l1181/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.com%2Flink%2F%3Fnav%3Duser.view%26user%3Dandfen6%26globalID%3DEBAY-ENCA%26referrer%3Dhttp%253A%252F%252Frover.ebay.com%252Frover%252F0%252Fe12050.m44.l1181%252F7%253Feuid%253D68fe0bd048d04a84b6d8ef4046dde4cd%2526cp%253D1&quot; style=&quot;text-decoration: none; font-weight: bold; color: #336fb7;&quot;>andfen6</a><a href=&quot;http://rover.ebay.com/rover/0/e12050.m44.l1183/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Ffeedback.ebay.ca%2Fws%2FeBayISAPI.dll%3FViewFeedback%26userid%3Dandfen6%26ssPageName%3DSTRK%3AME%3AUFS&quot; style=&quot;text-decoration: none; color: #888888;&quot;>(5)</a></h1></td></tr>            <tr><td valign=&quot;top&quot; class=&quot;viewing-problem-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border-bottom-width: 1px; border-bottom-color: #f9f9f9; padding: 10px 0 30px; border-style: none none solid;&quot;>          <table width=&quot;600&quot; class=&quot;device-width&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; border:0; cellpadding:0; cellspacing:0; align:center; bgcolor:#f9f9f9;&quot;>               <tr><td width=&quot;100%&quot; class=&quot;wrapText device-width&quot; valign=&quot;top&quot; style=&quot;overflow: hidden; border-collapse: collapse !important; border-spacing: 0 !important; border: none; display: inline-block; max-width:600px;&quot;><h3 style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 19px; color: #231f20; text-align: left; font-size: 14px; margin: 0 0 2px; font-weight:none;&quot; align=&quot;left&quot;><div id=&quot;UserInputtedText&quot;>Hi Kobo,<br /><br />As a buyer, I am interested....<br /><br />this is a test message</div></h3>                    <span style=&quot;color:#666666&quot;></span>				</td></tr>              <tr><td valign=&quot;top&quot; width=&quot;15&quot; height=&quot;15&quot; style=&quot;border-collapse: collapse !important; border-spacing: 20 !important; border: none;&quot;></td></tr>              <tr><td valign=&quot;top&quot; class=&quot;cta-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 5px 0 5px; border: none;&quot;><table align=&quot;left&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; class=&quot;mobile-full-width&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; class=&quot;center cta-button primary-cta-button&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; font-size: 14px; line-height: normal; font-weight: bold; box-shadow: 2px 3px 0 #e5e5e5; filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=&apos;#0079bc&apos;, endColorstr=&apos;#00519e&apos;,GradientType=0 ); background-image: linear-gradient(to bottom,  #0079bc 0%,#00519e 100%); background-color: #0079bc; padding: 10px 17px; border: 1px solid #00519e;&quot; bgcolor=&quot;#0079bc&quot;><a href=&quot;http://rover.ebay.com/rover/0/e12050.m44.l1139/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fcontact.ebay.ca%2Fws%2FeBayISAPI.dll%3FM2MContact%26requested%3Dandfen6%26qid%3D1291497258010%26redirect%3D0&quot; style=&quot;text-decoration: none; color: #ffffff; font-size: 14px; line-height: normal; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-shadow: 1px 1px 0 #00519e;&quot;><span style=&quot;padding: 0px 10px&quot;>Reply</span></a></td></tr></table>                </td></tr>           </table></td></tr></table>    <!--[if !mso]><!--><div id=&quot;V4PrimaryMessage&quot;  style=&quot;max-height: 0px; font-size: 0; overflow:hidden; display: none !important;&quot;><div><table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;3&quot; width=&quot;100%&quot;><tr><td><font style=&quot;font-size:10pt; font-family:arial, sans-serif; color:#000&quot;><strong>Dear rakutenkobo,</strong><br><br>Hi Kobo,<br /><br />As a buyer, I am interested....<br /><br />this is a test message<br><br></font><div style=&quot;font-weight:bold; font-size:10pt; font-family:arial, sans-serif; color:#000&quot;>- andfen6</div></td><td valign=&quot;top&quot; width=&quot;185&quot;><div></div></td></tr></table></div></div><!--<![endif]-->	</td>  </tr></table> <table id=&quot;area3Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9&quot;>    <tr>      <td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><table width=&quot;100%&quot; height=&quot;7&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-image: url(&amp;#39;http://p.ebaystatic.com/aw/navbar/preHeaderBottomShadow.png&amp;#39;); background-repeat: repeat-y no-repeat; margin: 0; padding: 0&quot;>  <tr><td width=&quot;100%&quot; height=&quot;1&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #dddddd;&quot;></td></tr>  <tr><td width=&quot;100%&quot; height=&quot;6&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: none;&quot;></td></tr></table>      </td>    </tr>  </table> <table id=&quot;area7Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9;&quot;>  <tr>    <td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>    <table width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#f9f9f9&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>            <tr><td valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; padding-right:20px;&quot;><h1 style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: bold; line-height: 22px; color: #808284; text-align: left; font-size: 16px; text-align: left; margin-top: 0px; border-style: none none solid; border-bottom-color: #dddddd; border-bottom-width: 1px;&quot; align=&quot;left&quot;>Get to know <a href=&quot;http://rover.ebay.com/rover/0/e12050.m3965.l1181/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.com%2Flink%2F%3Fnav%3Duser.view%26user%3Dandfen6%26globalID%3DEBAY-ENCA%26referrer%3Dhttp%253A%252F%252Frover.ebay.com%252Frover%252F0%252Fe12050.m3965.l1181%252F7%253Feuid%253D68fe0bd048d04a84b6d8ef4046dde4cd%2526cp%253D1&quot; style=&quot;text-decoration: none; color: #336fb7;&quot;>andfen6</a> </h1><table style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 19px; text-align: left; font-size: 14px; margin-bottom: 10px; padding-bottom: 10px;&quot; align=&quot;left&quot;><tr><td valign=&quot;top&quot; style=&quot;font-size: 20px; padding-left: 15px; padding-right: 5px;&quot;>&amp;bull;</td><td style=&quot;padding-bottom: 5px&quot;>Located: Toronto, ON, Canada</td></tr><tr><td valign=&quot;top&quot; style=&quot;font-size: 20px; padding-left: 15px; padding-right: 5px;&quot;>&amp;bull;</td><td style=&quot;padding-bottom: 5px&quot;>Member since: Dec 17, 2015</td></tr><tr><td valign=&quot;top&quot; style=&quot;font-size: 20px; padding-left: 15px; padding-right: 5px;&quot;>&amp;bull;</td><td style=&quot;padding-bottom: 5px&quot;>Positive Feedback: 100%</td></tr></table></td></tr></table></td></tr></table>  <table id=&quot;area10Container&quot; class=&quot;whiteSection&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #ffffff&quot;>  <tr>    <td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>            <table width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#ffffff&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; class=&quot;viewing-problem-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border-bottom-width: 1px; border-bottom-color: #dddddd; padding: 40px 0 30px; border-style: none none solid;&quot;><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;center&quot;>Only purchases on eBay are covered by the eBay purchase protection programs. Asking your trading partner to complete a transaction outside of eBay is not allowed.</p></td></tr></table>	</td>  </tr></table> <table id=&quot;area11Container&quot; class=&quot;whiteSection&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #ffffff&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>              <table width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; class=&quot;ebay-footer-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 40px 0 60px; border: none;&quot;>        <div id=&quot;ReferenceId&quot;><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;><strong>Email reference id: [#a05-c1pifaockd#]_[#68fe0bd048d04a84b6d8ef4046dde4cd#]</strong></p></div><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;>We don&apos;t check this mailbox, so please don&apos;t reply to this message. If you have a question, go to <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l6369/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Focsnext.ebay.ca%2Focs%2Fhome&quot; target=&quot;_blank&quot;>Help &amp; Contact</a>.</p>		    <p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;>eBay sent this message to Nantha Gopalasamy (rakutenkobo). Learn more about <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l3167/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.ca%2Fhelp%2Faccount%2Fprotecting-account.html&quot; target=&quot;_blank&quot;>account protection</a>. eBay is committed to your privacy. Learn more about our <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l3168/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.ca%2Fhelp%2Fpolicies%2Fprivacy-policy.html&quot; target=&quot;_blank&quot;>privacy policy</a> and <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l3165/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.ca%2Fhelp%2Fpolicies%2Fuser-agreement.html&quot; target=&quot;_blank&quot;>user agreement</a>.</p><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;>&amp;copy;2016 eBay Inc., eBay International AG Helvetiastrasse 15/17 - P.O. Box 133, 3000 Bern 6, Switzerland</p></td></tr></table></td></tr></table></body></html>"))
            //{
            //    Thread thread = new Thread(server.Start);
            //    thread.IsBackground = false;
            //    thread.Start();
            //    Console.WriteLine("server started");
            //    using (var driver = new PhantomJSDriver())
            //    {
            //        WebDriverWait driverWait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
            //        driver.Manage().Window.Maximize();
            //        driver.Navigate().GoToUrl("http://*****:*****@" <!DOCTYPE html><!--29175c33-bb68-31a4-a326-3fc888d22e35_v33--><html><head><meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=utf-8&quot;></meta><style id=&quot;DS3Style&quot; type=&quot;text/css&quot;>@media only screen and (max-width: 620px) {body[yahoo] .device-width {	width: 450px !important}body[yahoo] .threeColumns {	width: 140px !important}body[yahoo] .threeColumnsTd {	padding: 10px 4px !important}body[yahoo] .fourColumns {	width: 225px !important}body[yahoo] .fourColumnsLast {	width: 225px !important}body[yahoo] .fourColumnsTd {	padding: 10px 0px !important}body[yahoo] .fourColumnsPad {	padding: 0 0 0 0 !important}body[yahoo] .secondary-product-image {	width: 200px !important;	height: 200px !important}body[yahoo] .center {	text-align: center !important}body[yahoo] .twoColumnForty {	width: 200px !importantheight: 200px !important}body[yahoo] .twoColumnForty img {	width: 200px !important;	height: 200px !important}body[yahoo] .twoColumnSixty {	width: 228px !important}body[yahoo] .secondary-subhead-right {	display: none !important}body[yahoo] .secondary-subhead-left {	width: 450px !important}}@media only screen and (max-width: 479px) {body[yahoo] .navigation {	display: none !important}body[yahoo] .device-width {	width: 300px !important;	padding: 0}body[yahoo] .threeColumns {	width: 150px !important}body[yahoo] .fourColumns {	width: 150px !important}body[yahoo] .fourColumnsLast {	width: 150px !important}body[yahoo] .fourColumnsTd {	padding: 10px 0px !important}body[yahoo] .fourColumnsPad {	padding: 0 0 0 0 !important}body[yahoo] .secondary-product-image {	width: 240px !important;	height: 240px !important}body[yahoo] .single-product-table {	float: none !important;margin-bottom: 10px !important;margin-right: auto !important;margin-left: auto !important;}body[yahoo] .single-product-pad {	padding: 0 0 0 0 !important;}body[yahoo] .single-product-image {align:center;width: 200px !important;height: 200px !important}body[yahoo] .mobile-full-width {	width: 300px !important}body[yahoo] .twoColumnForty {align:center; !importantwidth: 200px !important}body[yahoo] .twoColumnForty img {}body[yahoo] .twoColumnSixty {padding-left: 0px !important;width: 300px !important}body[yahoo] .secondary-subhead-left {	width: 300px !important}body[yahoo] .ThreeColumnItemTable{        padding: 0px 0px 0px 74px !important}body[yahoo] .FourColumnFloater{float: right !important;}span.message-history{text-align: left !important;float: right !important;}}body[yahoo] .mobile-full-width {	min-width: 103px;max-width: 300px;height: 38px;}body[yahoo] .mobile-full-width a {	display: block;padding: 10px 0;}body[yahoo] .mobile-full-width td{	padding: 0px !important}td.wrapText{white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word; }@-moz-document url-prefix() {td.wrapTextFF_Fix {display: inline-block}}body { width: 100% !important; -webkit-text-size-adjust: 100% !important; -ms-text-size-adjust: 100% !important; -webkit-font-smoothing: antialiased !important; margin: 0 !important; padding: 0 0 100px !important; font-family: Helvetica, Arial, sans-serif !important; background-color:#f9f9f9}.ReadMsgBody { width: 100% !important; background-color: #ffffff !important; }.ExternalClass { width: 100% !important; }.ExternalClass { line-height: 100% !important; }img { display: block; outline: none !important; text-decoration: none !important; -ms-interpolation-mode: bicubic !important; }td{word-wrap: break-word;}</style><!--[if gte mso 9]>	<style>td.product-details-block{word-break:break-all}.threeColumns{width:140px !important}.threeColumnsTd{padding:10px 20px !important}.fourColumns{width:158px !important}.fourColumnsPad{padding: 0 18px 0 0 !important}.fourColumnsTd{padding:10px 0px !important}.twoColumnSixty{width:360px !important}table{mso-table-lspace:0pt; mso-table-rspace:0pt;}</style>	<![endif]--></head><body yahoo=&quot;fix&quot;><table id=&quot;area2Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><table width=&quot;600&quot; class=&quot;device-width header-logo&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#f9f9f9&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 0; border: none;&quot;><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 5px 0 10px 0; color: #333;&quot; align=&quot;left&quot;>New message: Hi Kobo,As a buyer, I am interest...</p></td></tr></table></td></tr></table> <table id=&quot;area3Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse:collapse !important;border-spacing:0 !important;border:none;background-color:#f9f9f9;&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse:collapse !important;border-spacing:0 !important;border:none;&quot;><table width=&quot;100%&quot; height=&quot;7&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-image: url(&apos;http://p.ebaystatic.com/aw/navbar/preHeaderBottomShadow.png&apos;); background-repeat: repeat-y no-repeat; margin: 0; padding: 0&quot;><!--[if gte mso 9]><v:rect xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; fill=&quot;true&quot; stroke=&quot;false&quot; style=&quot;mso-width-percent:1000;height:1px;&quot;><v:fill type=&quot;tile&quot; color=&quot;#dddddd&quot; /></v:rect><v:rect xmlns:v=&quot;urn:schemas-microsoft-com:vml&quot; fill=&quot;true&quot; stroke=&quot;false&quot; style=&quot;mso-width-percent:1000;height:6px;&quot;><v:fill type=&quot;tile&quot; src=&quot;http://p.ebaystatic.com/aw/navbar/preHeaderBottomShadow.png&quot; color=&quot;#f9f9f9&quot; /><div style=&quot;width:0px; height:0px; overflow:hidden; display:none; visibility:hidden; mso-hide:all;&quot;><![endif]--><tr><td width=&quot;100%&quot; height=&quot;1&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #dddddd; font-size: 1px; line-height: 1px;&quot;><!--[if gte mso 15]>&amp;nbsp;<![endif]--></td></tr><tr><td width=&quot;100%&quot; height=&quot;6&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: none; font-size: 1px; line-height: 1px;&quot;>&amp;nbsp;</td></tr><!--[if gte mso 9]></div></v:rect><![endif]--></table></td></tr></table>   <table id=&quot;area4Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><table width=&quot;600&quot; class=&quot;device-width header-logo&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 15px 0 20px; border: none;&quot;><a href=&quot;http://rover.ebay.com/rover/0/e12050.m1831.l3127/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.com%2Flink%2F%3Fnav%3Dhome%26alt%3Dweb%26globalID%3DEBAY-ENCA%26referrer%3Dhttp%253A%252F%252Frover.ebay.com%252Frover%252F0%252Fe12050.m1831.l3127%252F7%253Feuid%253D68fe0bd048d04a84b6d8ef4046dde4cd%2526cp%253D1&quot; style=&quot;text-decoration: none; color: #0654ba;&quot;><img src=&quot;http://p.ebaystatic.com/aw/logos/header_ebay_logo_132x46.gif&quot; width=&quot;132&quot; height=&quot;46&quot; border=&quot;0&quot; alt=&quot;eBay&quot; align=&quot;left&quot; style=&quot;display: inline block; outline: none; text-decoration: none; -ms-interpolation-mode: bicubic; border: none;&quot; /></a><img src=&quot;http://rover.ebay.com/roveropen/0/e12050/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&quot; alt=&quot;&quot; style=&quot;border:0; height:1;&quot;/></td></tr></table></td></tr></table> <table id=&quot;area5Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; background-color:#f9f9f9&quot;>  <tr>    <td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>    <table id=&quot;PrimaryMessage&quot; width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#f9f9f9&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>      <tr><td valign=&quot;top&quot; class=&quot;secondary-headline&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 20px 0 5px;&quot;><h1 style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 15px; color: #808284; text-align: left; font-size: 13px; margin: 0 0 4px;&quot; align=&quot;left&quot;>New message from:<a href=&quot;http://rover.ebay.com/rover/0/e12050.m44.l1181/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.com%2Flink%2F%3Fnav%3Duser.view%26user%3Dandfen6%26globalID%3DEBAY-ENCA%26referrer%3Dhttp%253A%252F%252Frover.ebay.com%252Frover%252F0%252Fe12050.m44.l1181%252F7%253Feuid%253D68fe0bd048d04a84b6d8ef4046dde4cd%2526cp%253D1&quot; style=&quot;text-decoration: none; font-weight: bold; color: #336fb7;&quot;>andfen6</a><a href=&quot;http://rover.ebay.com/rover/0/e12050.m44.l1183/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Ffeedback.ebay.ca%2Fws%2FeBayISAPI.dll%3FViewFeedback%26userid%3Dandfen6%26ssPageName%3DSTRK%3AME%3AUFS&quot; style=&quot;text-decoration: none; color: #888888;&quot;>(5)</a></h1></td></tr>            <tr><td valign=&quot;top&quot; class=&quot;viewing-problem-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border-bottom-width: 1px; border-bottom-color: #f9f9f9; padding: 10px 0 30px; border-style: none none solid;&quot;>          <table width=&quot;600&quot; class=&quot;device-width&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; border:0; cellpadding:0; cellspacing:0; align:center; bgcolor:#f9f9f9;&quot;>               <tr><td width=&quot;100%&quot; class=&quot;wrapText device-width&quot; valign=&quot;top&quot; style=&quot;overflow: hidden; border-collapse: collapse !important; border-spacing: 0 !important; border: none; display: inline-block; max-width:600px;&quot;><h3 style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 19px; color: #231f20; text-align: left; font-size: 14px; margin: 0 0 2px; font-weight:none;&quot; align=&quot;left&quot;><div id=&quot;UserInputtedText&quot;>Hi Kobo,<br /><br />As a buyer, I am interested....<br /><br />this is a test message</div></h3>                    <span style=&quot;color:#666666&quot;></span>				</td></tr>              <tr><td valign=&quot;top&quot; width=&quot;15&quot; height=&quot;15&quot; style=&quot;border-collapse: collapse !important; border-spacing: 20 !important; border: none;&quot;></td></tr>              <tr><td valign=&quot;top&quot; class=&quot;cta-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 5px 0 5px; border: none;&quot;><table align=&quot;left&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; border=&quot;0&quot; class=&quot;mobile-full-width&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; class=&quot;center cta-button primary-cta-button&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; font-size: 14px; line-height: normal; font-weight: bold; box-shadow: 2px 3px 0 #e5e5e5; filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=&apos;#0079bc&apos;, endColorstr=&apos;#00519e&apos;,GradientType=0 ); background-image: linear-gradient(to bottom,  #0079bc 0%,#00519e 100%); background-color: #0079bc; padding: 10px 17px; border: 1px solid #00519e;&quot; bgcolor=&quot;#0079bc&quot;><a href=&quot;http://rover.ebay.com/rover/0/e12050.m44.l1139/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fcontact.ebay.ca%2Fws%2FeBayISAPI.dll%3FM2MContact%26requested%3Dandfen6%26qid%3D1291497258010%26redirect%3D0&quot; style=&quot;text-decoration: none; color: #ffffff; font-size: 14px; line-height: normal; font-weight: bold; font-family: Helvetica, Arial, sans-serif; text-shadow: 1px 1px 0 #00519e;&quot;><span style=&quot;padding: 0px 10px&quot;>Reply</span></a></td></tr></table>                </td></tr>           </table></td></tr></table>    <!--[if !mso]><!--><div id=&quot;V4PrimaryMessage&quot;  style=&quot;max-height: 0px; font-size: 0; overflow:hidden; display: none !important;&quot;><div><table border=&quot;0&quot; cellpadding=&quot;2&quot; cellspacing=&quot;3&quot; width=&quot;100%&quot;><tr><td><font style=&quot;font-size:10pt; font-family:arial, sans-serif; color:#000&quot;><strong>Dear rakutenkobo,</strong><br><br>Hi Kobo,<br /><br />As a buyer, I am interested....<br /><br />this is a test message<br><br></font><div style=&quot;font-weight:bold; font-size:10pt; font-family:arial, sans-serif; color:#000&quot;>- andfen6</div></td><td valign=&quot;top&quot; width=&quot;185&quot;><div></div></td></tr></table></div></div><!--<![endif]-->	</td>  </tr></table> <table id=&quot;area3Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9&quot;>    <tr>      <td width=&quot;100%&quot; valign=&quot;top&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><table width=&quot;100%&quot; height=&quot;7&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-image: url(&amp;#39;http://p.ebaystatic.com/aw/navbar/preHeaderBottomShadow.png&amp;#39;); background-repeat: repeat-y no-repeat; margin: 0; padding: 0&quot;>  <tr><td width=&quot;100%&quot; height=&quot;1&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #dddddd;&quot;></td></tr>  <tr><td width=&quot;100%&quot; height=&quot;6&quot; valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: none;&quot;></td></tr></table>      </td>    </tr>  </table> <table id=&quot;area7Container&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color:#f9f9f9;&quot;>  <tr>    <td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>    <table width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#f9f9f9&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>            <tr><td valign=&quot;top&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; padding-right:20px;&quot;><h1 style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: bold; line-height: 22px; color: #808284; text-align: left; font-size: 16px; text-align: left; margin-top: 0px; border-style: none none solid; border-bottom-color: #dddddd; border-bottom-width: 1px;&quot; align=&quot;left&quot;>Get to know <a href=&quot;http://rover.ebay.com/rover/0/e12050.m3965.l1181/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.com%2Flink%2F%3Fnav%3Duser.view%26user%3Dandfen6%26globalID%3DEBAY-ENCA%26referrer%3Dhttp%253A%252F%252Frover.ebay.com%252Frover%252F0%252Fe12050.m3965.l1181%252F7%253Feuid%253D68fe0bd048d04a84b6d8ef4046dde4cd%2526cp%253D1&quot; style=&quot;text-decoration: none; color: #336fb7;&quot;>andfen6</a> </h1><table style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: 19px; text-align: left; font-size: 14px; margin-bottom: 10px; padding-bottom: 10px;&quot; align=&quot;left&quot;><tr><td valign=&quot;top&quot; style=&quot;font-size: 20px; padding-left: 15px; padding-right: 5px;&quot;>&amp;bull;</td><td style=&quot;padding-bottom: 5px&quot;>Located: Toronto, ON, Canada</td></tr><tr><td valign=&quot;top&quot; style=&quot;font-size: 20px; padding-left: 15px; padding-right: 5px;&quot;>&amp;bull;</td><td style=&quot;padding-bottom: 5px&quot;>Member since: Dec 17, 2015</td></tr><tr><td valign=&quot;top&quot; style=&quot;font-size: 20px; padding-left: 15px; padding-right: 5px;&quot;>&amp;bull;</td><td style=&quot;padding-bottom: 5px&quot;>Positive Feedback: 100%</td></tr></table></td></tr></table></td></tr></table>  <table id=&quot;area10Container&quot; class=&quot;whiteSection&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #ffffff&quot;>  <tr>    <td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>    		<table width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; bgcolor=&quot;#ffffff&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; class=&quot;viewing-problem-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border-bottom-width: 1px; border-bottom-color: #dddddd; padding: 40px 0 30px; border-style: none none solid;&quot;><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;center&quot;>Only purchases on eBay are covered by the eBay purchase protection programs. Asking your trading partner to complete a transaction outside of eBay is not allowed.</p></td></tr></table>	</td>  </tr></table> <table id=&quot;area11Container&quot; class=&quot;whiteSection&quot; width=&quot;100%&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none; background-color: #ffffff&quot;><tr><td width=&quot;100%&quot; valign=&quot;top&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;>              <table width=&quot;600&quot; class=&quot;device-width&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; align=&quot;center&quot;   style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; border: none;&quot;><tr><td valign=&quot;top&quot; class=&quot;ebay-footer-block&quot; style=&quot;border-collapse: collapse !important; border-spacing: 0 !important; padding: 40px 0 60px; border: none;&quot;>   		<div id=&quot;ReferenceId&quot;><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;><strong>Email reference id: [#a05-c1pifaockd#]_[#68fe0bd048d04a84b6d8ef4046dde4cd#]</strong></p></div><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;>We don&apos;t check this mailbox, so please don&apos;t reply to this message. If you have a question, go to <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l6369/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Focsnext.ebay.ca%2Focs%2Fhome&quot; target=&quot;_blank&quot;>Help &amp; Contact</a>.</p>		    <p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;>eBay sent this message to Nantha Gopalasamy (rakutenkobo). Learn more about <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l3167/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.ca%2Fhelp%2Faccount%2Fprotecting-account.html&quot; target=&quot;_blank&quot;>account protection</a>. eBay is committed to your privacy. Learn more about our <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l3168/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.ca%2Fhelp%2Fpolicies%2Fprivacy-policy.html&quot; target=&quot;_blank&quot;>privacy policy</a> and <a style=&quot;text-decoration: none; color: #555555;&quot; href=&quot;http://rover.ebay.com/rover/0/e12050.m1852.l3165/7?euid=68fe0bd048d04a84b6d8ef4046dde4cd&amp;loc=http%3A%2F%2Fpages.ebay.ca%2Fhelp%2Fpolicies%2Fuser-agreement.html&quot; target=&quot;_blank&quot;>user agreement</a>.</p><p style=&quot;font-family: Helvetica, Arial, sans-serif; font-weight: normal; line-height: normal; color: #888888; text-align: left; font-size: 11px; margin: 0 0 10px;&quot; align=&quot;left&quot;>&amp;copy;2016 eBay Inc., eBay International AG Helvetiastrasse 15/17 - P.O. Box 133, 3000 Bern 6, Switzerland</p></td></tr></table></td></tr></table></body></html>");
                {
                    server.Start();
                    Console.WriteLine("server started");
                    driver.Manage().Window.Maximize();
                    driver.Navigate().GoToUrl("http://localhost:7104/message/");
                    var element = driver.FindElement(By.Id("UserInputtedText"));
                    Console.WriteLine(element.Text);

                    for (int i = 0; i < 100; i++)
                    {
                        server.SetService("new content: " + i);
                        driver.Navigate().GoToUrl("http://localhost:7104/message/");
                        Console.WriteLine(driver.PageSource);
                    }
                }
            }



            // start async http server
            //HttpServerAsync.ListenAsync();
            //WebClient wc = new WebClient(); // Make a client request.
            //Console.WriteLine(wc.DownloadString
            //("http://localhost:51111/MyApp/Request.txt"));

            // local parser
            //LocalParser.Process();
        }
        protected override IWebDriver InitializeDriver()
        {
            var driver = new PhantomJSDriver();

            driver.Manage().Window.Size = new System.Drawing.Size(1920, 1080);

            return(driver);
        }