Skip to content

Commit 2fbfc62

Browse files
committed
[dotnet] remove obsolete commands
1 parent 3b3a3ed commit 2fbfc62

File tree

4 files changed

+0
-228
lines changed

4 files changed

+0
-228
lines changed

dotnet/src/webdriver/Alert.cs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,5 @@ public void SendKeys(string keysToSend)
8181

8282
this.driver.InternalExecute(DriverCommand.SetAlertValue, parameters);
8383
}
84-
85-
/// <summary>
86-
/// Sets the user name and password in an alert prompting for credentials.
87-
/// </summary>
88-
/// <param name="userName">The user name to set.</param>
89-
/// <param name="password">The password to set.</param>
90-
public void SetAuthenticationCredentials(string userName, string password)
91-
{
92-
Dictionary<string, object> parameters = new Dictionary<string, object>();
93-
parameters.Add("username", userName);
94-
parameters.Add("password", password);
95-
this.driver.InternalExecute(DriverCommand.SetAlertCredentials, parameters);
96-
}
9784
}
9885
}

dotnet/src/webdriver/DriverCommand.cs

Lines changed: 0 additions & 150 deletions
Original file line numberDiff line numberDiff line change
@@ -361,156 +361,6 @@ public static class DriverCommand
361361
/// </summary>
362362
public static readonly string GetLog = "getLog";
363363

364-
/// <summary>
365-
/// Represents the Define Driver Mapping command
366-
/// </summary>
367-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
368-
public static readonly string DefineDriverMapping = "defineDriverMapping";
369-
370-
/// <summary>
371-
/// Represents the Get Session List command
372-
/// </summary>
373-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
374-
public static readonly string GetSessionList = "getSessionList";
375-
376-
/// <summary>
377-
/// Represents the Get Session Capabilities command
378-
/// </summary>
379-
[Obsolete("Command not defined by W3C WebDriver Specification. Actual capabilities are returned by the new session command.")]
380-
public static readonly string GetSessionCapabilities = "getSessionCapabilities";
381-
382-
/// <summary>
383-
/// Represents SubmitElement command
384-
/// </summary>
385-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
386-
public static readonly string SubmitElement = "submitElement";
387-
388-
/// <summary>
389-
/// Represents GetElementLocation command
390-
/// </summary>
391-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the get element rect command instead.")]
392-
public static readonly string GetElementLocation = "getElementLocation";
393-
394-
/// <summary>
395-
/// Represents GetElementLocationOnceScrolledIntoView command
396-
/// </summary>
397-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the get element rect command instead.")]
398-
public static readonly string GetElementLocationOnceScrolledIntoView = "getElementLocationOnceScrolledIntoView";
399-
400-
/// <summary>
401-
/// Represents GetElementSize command
402-
/// </summary>
403-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the get element rect command instead.")]
404-
public static readonly string GetElementSize = "getElementSize";
405-
406-
/// <summary>
407-
/// Represents GetWindowSize command
408-
/// </summary>
409-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the get window rect command instead.")]
410-
public static readonly string GetWindowSize = "getWindowSize";
411-
412-
/// <summary>
413-
/// Represents SetWindowSize command
414-
/// </summary>
415-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the set window rect command instead.")]
416-
public static readonly string SetWindowSize = "setWindowSize";
417-
418-
/// <summary>
419-
/// Represents GetWindowPosition command
420-
/// </summary>
421-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the get window rect command instead.")]
422-
public static readonly string GetWindowPosition = "getWindowPosition";
423-
424-
/// <summary>
425-
/// Represents SetWindowPosition command
426-
/// </summary>
427-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the set window rect command instead.")]
428-
public static readonly string SetWindowPosition = "setWindowPosition";
429-
430-
/// <summary>
431-
/// Represents the ImplicitlyWait command
432-
/// </summary>
433-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the set timeouts command instead.")]
434-
public static readonly string ImplicitlyWait = "implicitlyWait";
435-
436-
/// <summary>
437-
/// Represents the SetAsyncScriptTimeout command
438-
/// </summary>
439-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the set timeouts command instead.")]
440-
public static readonly string SetAsyncScriptTimeout = "setScriptTimeout";
441-
442-
/// <summary>
443-
/// Represents TapElement command
444-
/// </summary>
445-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
446-
public static readonly string TapElement = "tapElement";
447-
448-
/// <summary>
449-
/// Represents the MouseClick command.
450-
/// </summary>
451-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
452-
public static readonly string MouseClick = "mouseClick";
453-
454-
/// <summary>
455-
/// Represents the MouseDoubleClick command.
456-
/// </summary>
457-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
458-
public static readonly string MouseDoubleClick = "mouseDoubleClick";
459-
460-
/// <summary>
461-
/// Represents the MouseDown command.
462-
/// </summary>
463-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
464-
public static readonly string MouseDown = "mouseDown";
465-
466-
/// <summary>
467-
/// Represents the MouseUp command.
468-
/// </summary>
469-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
470-
public static readonly string MouseUp = "mouseUp";
471-
472-
/// <summary>
473-
/// Represents the MouseMoveTo command.
474-
/// </summary>
475-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
476-
public static readonly string MouseMoveTo = "mouseMoveTo";
477-
478-
/// <summary>
479-
/// Represents the SendKeysToActiveElement command.
480-
/// </summary>
481-
[Obsolete("Command not defined by W3C WebDriver Specification. Use the actions command to define user interactions.")]
482-
public static readonly string SendKeysToActiveElement = "sendKeysToActiveElement";
483-
484-
/// <summary>
485-
/// Represents the Authenticate command
486-
/// </summary>
487-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
488-
public static readonly string SetAlertCredentials = "setAlertCredentials";
489-
490-
/// <summary>
491-
/// Represents GetOrientation command
492-
/// </summary>
493-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
494-
public static readonly string GetOrientation = "getOrientation";
495-
496-
/// <summary>
497-
/// Represents SetOrientation command
498-
/// </summary>
499-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
500-
public static readonly string SetOrientation = "setOrientation";
501-
502-
/// <summary>
503-
/// Represents the GetLocation command.
504-
/// </summary>
505-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
506-
public static readonly string GetLocation = "getLocation";
507-
508-
/// <summary>
509-
/// Represents the SetLocation command.
510-
/// </summary>
511-
[Obsolete("Command not defined by W3C WebDriver Specification.")]
512-
public static readonly string SetLocation = "setLocation";
513-
514364
public static readonly IList<string> KnownCommands = new List<string>()
515365
{
516366
Status,

dotnet/src/webdriver/IAlert.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,5 @@ public interface IAlert
4343
/// </summary>
4444
/// <param name="keysToSend">The keystrokes to send.</param>
4545
void SendKeys(string keysToSend);
46-
47-
/// <summary>
48-
/// Sets the user name and password in an alert prompting for credentials.
49-
/// </summary>
50-
/// <param name="userName">The user name to set.</param>
51-
/// <param name="password">The password to set.</param>
52-
void SetAuthenticationCredentials(string userName, string password);
5346
}
5447
}

dotnet/test/common/AlertsTest.cs

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -462,64 +462,6 @@ public void ShouldHandleAlertOnFormSubmit()
462462
Assert.AreEqual("Testing Alerts", driver.Title);
463463
}
464464

465-
// Disabling test for all browsers. Authentication API is not supported by any driver yet.
466-
// [Test]
467-
[IgnoreBrowser(Browser.Chrome)]
468-
[IgnoreBrowser(Browser.Edge)]
469-
[IgnoreBrowser(Browser.Firefox)]
470-
[IgnoreBrowser(Browser.IE)]
471-
[IgnoreBrowser(Browser.Remote)]
472-
[IgnoreBrowser(Browser.Safari)]
473-
public void ShouldBeAbleToHandleAuthenticationDialog()
474-
{
475-
driver.Url = authenticationPage;
476-
IAlert alert = WaitFor<IAlert>(AlertToBePresent, "No alert found");
477-
alert.SetAuthenticationCredentials("test", "test");
478-
alert.Accept();
479-
Assert.That(driver.FindElement(By.TagName("h1")).Text, Does.Contain("authorized"));
480-
}
481-
482-
// Disabling test for all browsers. Authentication API is not supported by any driver yet.
483-
// [Test]
484-
[IgnoreBrowser(Browser.Chrome)]
485-
[IgnoreBrowser(Browser.Edge)]
486-
[IgnoreBrowser(Browser.Firefox)]
487-
[IgnoreBrowser(Browser.IE)]
488-
[IgnoreBrowser(Browser.Remote)]
489-
[IgnoreBrowser(Browser.Safari)]
490-
public void ShouldBeAbleToDismissAuthenticationDialog()
491-
{
492-
driver.Url = authenticationPage;
493-
IAlert alert = WaitFor<IAlert>(AlertToBePresent, "No alert found");
494-
alert.Dismiss();
495-
}
496-
497-
// Disabling test for all browsers. Authentication API is not supported by any driver yet.
498-
// [Test]
499-
[IgnoreBrowser(Browser.Chrome)]
500-
[IgnoreBrowser(Browser.Edge)]
501-
[IgnoreBrowser(Browser.Firefox)]
502-
[IgnoreBrowser(Browser.Remote)]
503-
[IgnoreBrowser(Browser.Safari)]
504-
public void ShouldThrowAuthenticatingOnStandardAlert()
505-
{
506-
driver.Url = alertsPage;
507-
driver.FindElement(By.Id("alert")).Click();
508-
IAlert alert = WaitFor<IAlert>(AlertToBePresent, "No alert found");
509-
try
510-
{
511-
alert.SetAuthenticationCredentials("test", "test");
512-
Assert.Fail("Should not be able to Authenticate");
513-
}
514-
catch (UnhandledAlertException)
515-
{
516-
// this is an expected exception
517-
}
518-
519-
// but the next call should be good.
520-
alert.Dismiss();
521-
}
522-
523465
private IAlert AlertToBePresent()
524466
{
525467
return driver.SwitchTo().Alert();

0 commit comments

Comments
 (0)