I'm trying to do do an arrow using Selenium Webdriver/C# compile but when I try to compile I get this error:
'Keys' is an ambiguous reference between 'OpenQA.Selenium.Keys' and 'System.Windows.Forms.Keys' (CS0104)
My code:
driver.FindElement(By.Id("ctl00_PlaceHolderMain_ctrlChangeBillingAddress_ctrlChangeBillingAddress_txtBillingAddress")).SendKeys(Keys.ArrowDown);
driver.FindElement(By.Id("ctl00_PlaceHolderMain_ctrlChangeBillingAddress_ctrlChangeBillingAddress_txtBillingAddress")).SendKeys(Keys.Enter);
I can provide you two realizations, but the first one works only locally:
Element.SendKeys(OpenQA.Selenium.Keys.ArrowUp);
char c = '\uE013'; // ASCII code ArrowUp
Element.SendKeys(Convert.ToString(c));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With