Skip to content

Instantly share code, notes, and snippets.

@executeautomation
Created May 27, 2019 06:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save executeautomation/f0d73f655fdd6b0dd7e03e183f734a36 to your computer and use it in GitHub Desktop.
Save executeautomation/f0d73f655fdd6b0dd7e03e183f734a36 to your computer and use it in GitHub Desktop.
TestProject .NET Core Addon
using System;
using OpenQA.Selenium;
using TestProject.Common.Attributes;
using TestProject.SDK;
using TestProject.SDK.Addons.ElementAction;
using TestProject.SDK.Addons.Helpers;
namespace ClearTextBoxAddon.Addons
{
[Action(Name = "Clear Text", Description = "Clears text from the Textbox of Web UI")]
public class ClearText : IWebElementAction
{
public ExecutionResult Execute(WebAddonHelper helper, IWebElement element)
{
var driver = helper.Driver;
//Clear the elements text
element.Clear();
return ExecutionResult.Passed;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment