ArgumentAttribute Class

Description

Used to explicitly specify the name of an argument of a method that is marked as a keyword for keyword-driven testing.

Syntax

<AttributeUsageAttribute(AttributeTargets.Parameter>
Public Class ArgumentAttribute Inherits Attribute

Properties

Name Description
Name Property (ArgumentAttribute) Gets the name of the argument.

Example: Creating a keyword with two arguments

Use the following code sample to create the keyword Login with the arguments username and password:

<Keyword()>
Public Sub Login(<Argument("Name of the user")> username As String, <Argument("Password of the user")> password As String)
  ' keyword implementation
End Sub

Example: Using arguments without a description

Use one of the following code samples to create the keyword Login with the arguments username and password, without using a description for the arguments:

<Keyword()>
Public Sub Login(username As String, password As String)
  ' keyword implementation
End Sub
<Keyword()>
Public Sub Login(<Argument> username As String, <Argument> password As String)
  ' keyword implementation
End Sub