Beispiel #1
0
        public IApplicationSource RemoteChrome()
        {
            List <string> options = new List <string>()
            {
                "--headless", "--no-gpu", "--disable-software-rasterizer", "--mute-audio",
                "--hide-scrollbars"
            };
            Dictionary <string, object> capabilities = new Dictionary <string, object>
            {
                { "browser", CONST.CHROME_BROWSER },
                { CapabilityType.Platform, "Linux" }
            };

            return(ApplicationSource.Get()
                   .SetBrowserName(CONST.REMOTE_BROWSER)
                   .SetImplicitWaitTimeOut(15L)
                   .SetExplicitTimeOut(15L)
                   .SetBaseUrl(CONST.BASE_URL)
                   .SetLoginUrl(CONST.LOGIN_URL)
                   .SetLogoutUrl(CONST.LOGOUT_URL)
                   .SetBrowserOptions(options)
                   .SetCapabilities(capabilities)
                   .SetUri(new Uri(CONST.SELENIUM_HUB))
                   .Build());
        }
Beispiel #2
0
 public IApplicationSource FirefoxWithUi()
 {
     return(ApplicationSource.Get()
            .SetBrowserName(CONST.FIREFOX_BROWSER)
            .SetImplicitWaitTimeOut(10L)
            .SetExplicitTimeOut(10L)
            .SetBaseUrl(CONST.BASE_URL)
            .SetLoginUrl(CONST.LOGIN_URL)
            .SetLogoutUrl(CONST.LOGOUT_URL)
            .Build());
 }
Beispiel #3
0
        public IApplicationSource ChromeWithoutUi()
        {
            List <string> options = new List <string>()
            {
                "--headless", "--no-proxy-server", "--ignore-certificate-errors"
            };

            return(ApplicationSource.Get()
                   .SetBrowserName(CONST.CHROME_BROWSER)
                   .SetImplicitWaitTimeOut(10L)
                   .SetExplicitTimeOut(10L)
                   .SetBaseUrl(CONST.BASE_URL)
                   .SetLoginUrl(CONST.LOGIN_URL)
                   .SetLogoutUrl(CONST.LOGOUT_URL)
                   .SetBrowserOptions(options)
                   .Build());
        }
Beispiel #4
0
        public IApplicationSource RemoteLinuxChromeNew()
        {
            List <string> options = new List <string>()
            {
                "--no-sandbox", "--display=:99.0"
            };
            Dictionary <string, object> capabilities = new Dictionary <string, object>
            {
                { "browser", CONST.CHROME_BROWSER },
                { CapabilityType.Platform, "Linux" }
            };

            return(ApplicationSource.Get()
                   .SetBrowserName(CONST.REMOTE_BROWSER)
                   .SetImplicitWaitTimeOut(15L)
                   .SetExplicitTimeOut(15L)
                   .SetBaseUrl(CONST.BASE_URL)
                   .SetLoginUrl(CONST.LOGIN_URL)
                   .SetLogoutUrl(CONST.LOGOUT_URL)
                   .SetBrowserOptions(options)
                   .SetCapabilities(capabilities)
                   .SetUri(new Uri(CONST.SELENIUM_HUB))
                   .Build());
        }
Beispiel #5
0
        public IApplicationSource RemoteFirefox()
        {
            List <string> options = new List <string>()
            {
                "--headless", "--ignore-certificate-errors", "--acceptInsecureCerts-false"
            };
            Dictionary <string, object> capabilities = new Dictionary <string, object>
            {
                { "browser", CONST.FIREFOX_BROWSER },
                { CapabilityType.Platform, "Linux" }
            };

            return(ApplicationSource.Get()
                   .SetBrowserName(CONST.REMOTE_BROWSER)
                   .SetImplicitWaitTimeOut(15L)
                   .SetExplicitTimeOut(15L)
                   .SetBaseUrl(CONST.BASE_URL)
                   .SetLoginUrl(CONST.LOGIN_URL)
                   .SetLogoutUrl(CONST.LOGOUT_URL)
                   .SetBrowserOptions(options)
                   .SetCapabilities(capabilities)
                   .SetUri(new Uri(CONST.SELENIUM_HUB))
                   .Build());
        }