public PlayGroundView() { InitializeComponent(); this.presenter = Presenters.PlayGroundPresenter; presenter.InitWithView(this); txtJavaScriptCode.Language = FastColoredTextBoxNS.Language.JS; presenter.InitiCodeEditor(); txtJavaScriptCode.Text = @"// WebDriver Playground enables you to operate the WebElements at runtime. // Go to any page and define any web element into PageObject tree on the right side. // For instance, you have declared a text field with name “txtLogin”. // Now you can write the following JavaScript to manipulate the web element: // // txtLogin.Clear() // txtLogin.SendKeys(""Hello World"") // // WebDriver Playground is in ALPHA quality. The following classes supported: // PageObject web elements, (IWebElement), driver (IWebDriver), By, Keys, Actions. driver.Navigate().GoToUrl(""https://github.com/dzharii/swd-recorder""); driver.GetScreenshot().SaveAsFile(""Screenshots\\mywebpagetest.png"", ScreenshotImageFormat.Png); // See <SwdRecorder.exe-folder>\Screenshots "; }
public PlayGroundView() { InitializeComponent(); this.presenter = Presenters.PlayGroundPresenter; presenter.InitWithView(this); txtJavaScriptCode.Language = FastColoredTextBoxNS.Language.JS; // https://msdn.microsoft.com/en-us/library/cc221403%28v=vs.95%29.aspx this.runScriptBackgroundWorker = new System.ComponentModel.BackgroundWorker(); this.runScriptBackgroundWorker.DoWork += new DoWorkEventHandler(runScriptBackgroundWorker_DoWork); // this.runScriptBackgroundWorker.ProgressChanged += new ProgressChangedEventHandler(backgroundWorkerExample_ProgressChanged); this.runScriptBackgroundWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(runScriptBackgroundWorker_RunWorkerCompleted); presenter.InitiCodeEditor(); txtJavaScriptCode.Text = @"// WebDriver Playground enables you to operate the WebElements at runtime. // Go to any page and define any web element into PageObject tree on the right side. // For instance, you have declared a text field with name “txtLogin”. // Now you can write the following JavaScript to manipulate the web element: // // txtLogin.Clear() // txtLogin.SendKeys(""Hello World"") // // WebDriver Playground is in ALPHA quality. The following classes supported: // PageObject web elements, (IWebElement), driver (IWebDriver), By, Keys, Actions. driver.Navigate().GoToUrl(""https://github.com/dzharii/swd-recorder""); driver.GetScreenshot().SaveAsFile(""Screenshots\\mywebpagetest.png"", ImageFormat.Png); // See <SwdRecorder.exe-folder>\Screenshots "; }