This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| driver.Url = "https://www.qat2.weightwatchers.com/us/"; | |
| IWebElement element = driver.FindElement(By.CssSelector(".menu-link__inner-wrapper")); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| element = self.browser.find_element_by_id("send2") | |
| self.browser.execute_script("arguments[0].style.border='5px solid red';", element) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Line 1198 of window_commands.cc | |
| base::char16 key = raw_key[0]; | |
| // TODO: understand necessary_modifiers | |
| int necessary_modifiers = 0; | |
| ui::KeyboardCode key_code = ui::VKEY_UNKNOWN; | |
| // Modifications begin here | |
| bool should_skip = false; | |
| if (!KeyCodeFromSpecialWebDriverKey(key, &key_code) && | |
| !KeyCodeFromShorthandKey(key, &key_code, &should_skip) { | |
| std::string error_msg; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // The below code excerpt begins at line 997 of window_commands.cc in ProcessInputActionSequence | |
| } else if (type == "key") { | |
| // process key action | |
| std::string subtype; | |
| if (!action_item->GetString("type", &subtype) || | |
| (subtype != "keyUp" && subtype != "keyDown" && subtype != "pause")) | |
| return Status( | |
| kInvalidArgument, | |
| "type of action must be the string 'keyUp', 'keyDown' or 'pause'"); | |
| action->SetString("id", id); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| java -cp buck-out\gen\java\client\test\org\openqa\selenium\environment\webserver.jar org.openqa.selenium.environment.webserver.JettyAppServer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ChromeOptions options = new ChromeOptions(); | |
| HttpCommandExecutor executor = new HttpCommandExecutor(new Uri("http://ondemand.saucelabs.com"), TimeSpan.FromSeconds(60)); | |
| // Set up your proxy here. | |
| executor.Proxy = new System.Net.WebProxy(); | |
| IWebDriver driver = new RemoteWebDriver(executor, options.ToCapabilities()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void SimpleSelenium4Example() | |
| { | |
| //TODO please supply your Sauce Labs user name in an environment variable | |
| var sauceUserName = Environment.GetEnvironmentVariable("SAUCE_USERNAME", EnvironmentVariableTarget.User); | |
| //TODO please supply your own Sauce Labs access Key in an environment variable | |
| var sauceAccessKey = Environment.GetEnvironmentVariable("SAUCE_ACCESS_KEY", EnvironmentVariableTarget.User); | |
| var options = new EdgeOptions() | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Test] | |
| public void ClickLabelTest() | |
| { | |
| driver.Url = EnvironmentManager.Instance.UrlBuilder.CreateInlinePage(new InlinePage() | |
| .WithBody( | |
| "<label id='wrapper'>wraps a checkbox <input id='check' type='checkbox' checked='checked' style='display:none'/></label>")); | |
| IWebElement label = driver.FindElement(By.Id("wrapper")); | |
| label.Click(); | |
| IWebElement checkbox = driver.FindElement(By.Id("check")); | |
| Assert.IsFalse(checkbox.Selected); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "sessionId":"c8e250efce0ee5d78fef4e0d05962cdf", | |
| "status":0, | |
| "value":{ | |
| "acceptInsecureCerts":false, | |
| "acceptSslCerts":false, | |
| "applicationCacheEnabled":false, | |
| "browserConnectionEnabled":false," | |
| browserName":"chrome", | |
| "chrome":{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # reminder: '\uE008' is the Shift key | |
| { "actions": [ | |
| { | |
| "type": "key", | |
| "id": "default keyboard", | |
| "actions": [ | |
| { "type": "keyDown", "value": "\uE008" }, | |
| { "type": "keyDown", "value": "a" }, | |
| { "type": "keyUp", "value": "a" }, |