2016-04-27 3 views
1

Ich habe diese eine XML-Datei, in der ich den Wert des bestimmten Tags benötigen. Ich benutze testecomplete als ein Werkzeug und C# -Skript, um es zu kodieren. Irgendwelche Vorschläge, wie man es macht?Suche eine XML-Datei für bestimmte Attributwerte in testcomplete

+2

Put * einige * Aufwand in. Nur Googeln "C# XML erhalten Wert des Elements" erhalten Sie viele Ergebnisse - LINQ to XML ist wahrscheinlich die schönste Lösung. Stellen Sie eine Frage, wenn Sie ein * spezifisches * Problem haben. –

Antwort

1

mit XML-Dateien in Testcomplete arbeiten zu können, die folgenden Objekte verwenden kann:

XML DOM objects. You can use these objects to work with any XML file. Working with these objects requires more efforts and knowledge of XML DOM. However, we suggest that you use these objects to work with XML files. 

TestComplete’s Storages object. You use the methods and properties of this object to write data to and read it from XML files. However, this object works only with XML files created with the Storage.XML method (such files have a specific format, they include sections, subsections and options). For more information on this, see Section Object. If you try to open an XML file that has another format by using the Storage.XML method, an error will occur. 

enter link description here

0

Nun, Testcomplete mit einer äußerst nützlichen Hilfedatei geliefert, die auch online ist. Zum Beispiel erläutert das Thema Working With XML Files From Scripts, wie Sie Ihre Aufgabe auf verschiedene Arten mit Beispielen lösen können.

Verwandte Themen