Condividi tramite


Proprietà ExtractAttributeValue.MatchAttributeName

Aggiornamento: novembre 2007

Ottiene o imposta un nome di attributo aggiuntivo che deve trovarsi nel tag HTML contenente il valore di attributo da estrarre. Viene utilizzata insieme a MatchAttributeValue.

Spazio dei nomi:  Microsoft.VisualStudio.TestTools.WebTesting.Rules
Assembly:  Microsoft.VisualStudio.QualityTools.WebTestFramework (in Microsoft.VisualStudio.QualityTools.WebTestFramework.dll)

Sintassi

Public Property MatchAttributeName As String

Dim instance As ExtractAttributeValue
Dim value As String

value = instance.MatchAttributeName

instance.MatchAttributeName = value
public string MatchAttributeName { get; set; }
public:
property String^ MatchAttributeName {
    String^ get ();
    void set (String^ value);
}
public function get MatchAttributeName () : String
public function set MatchAttributeName (value : String)

Valore proprietà

Tipo: System.String

Nome di attributo.

Note

Questa proprietà, insieme a MatchAttributeValue, fornisce informazioni aggiuntive per la specifica dell'attributo da estrarre.

Si consideri il seguente codice HTML:

<input name="Name" type="text" id="TextBox1" size="25" />

<input name="Email" type="text" id="TextBox2" size="25" />

<input name="Password" type="password" id="TextBox3" size="25" />

Se ad esempio si desidera estrarre l'id della casella di input Email, impostare la proprietà TagName su input e la proprietà AttributeName su id.

Si noti che tutti e tre i tag nel codice HTML sono tag input e contengono un attributo id. Per estrarre l'attributo dal tag corretto, è necessario fornire informazioni aggiuntive. Impostare la proprietà MatchAttributeName su namee la proprietà MatchAttributeValue su Email. A questo punto l'attributo verrà estratto dall'unico tag che soddisfa i criteri specificati.

Autorizzazioni

Vedere anche

Riferimenti

ExtractAttributeValue Classe

Membri ExtractAttributeValue

Spazio dei nomi Microsoft.VisualStudio.TestTools.WebTesting.Rules