Condividi tramite


Proprietà ExtractAttributeValue.MatchAttributeValue

Aggiornamento: novembre 2007

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

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

Sintassi

Public Property MatchAttributeValue As String

Dim instance As ExtractAttributeValue
Dim value As String

value = instance.MatchAttributeValue

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

Valore proprietà

Tipo: System.String

Valore di attributo.

Note

Questa proprietà, insieme a MatchAttributeName, 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" />

È ad esempio possibile che si decida di estrarre l'id della casella di input Email. A questo scopo, 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