Closed cookyrag closed 2 years ago
Found the answer in the Azure DevOps issue , you have to specify a size for headless mode
var client = new WebClient(TestSettings.Options); if (TestSettings.Options.Headless) client.Browser.Driver.Manage().Window.Size = new Size(1920, 1080);
Hi @Cookyrag, Me too facing the issue, but where in my Testsettings.cs I am already passing Headless value False. If put this condition while initializing the client it wont pick. Please let me know what you declared in options. Please clarify. My code in Testing.cs public static BrowserOptions Options = new BrowserOptions { BrowserType = (BrowserType)Enum.Parse(typeof(BrowserType), Type), PrivateMode = true, FireEvents = false, Headless = false, UserAgent = false, DefaultThinkTime = 2000, UCITestMode = true, CookieСontrolsMode = 0 } If I declare Headless to True doesn't invoke chrome. and in XrmBindings.cs I am initializing the client.
protected WebClient Client { get { if (_client == null) { _client = new WebClient(TestSettings.Options); } return _client; } }
Has any one been able to use Headless Mode. Inspecting the page source it appears Dynamics renders the page differently in headless Mode. For example the site navigations renders as buttons and not LIs.
Is there another setting that needs to be set to get dynamics to render the page the same