0
我正在使用Javascript語言的TestComplete測試自動化工具進行測試腳本創建。如何從使用Javascript的HTML頁面中的<SCRIPT>標記獲取特定數據
我需要從HTML頁面源獲取特定數據。
這是我看到用Ctrl-U:
<!DOCTYPE HTML>
<SCRIPT>
~some script~;
</SCRIPT>
<HTML>
<HEAD>
~a few lines with tags~
<STYLE>
…
...
</STYLE>
</HEAD>
<BODY style="display:none">
<SCRIPT>
cWebBase="~someValue~";
cWebImgs="~someValue~";
cWebStyle="~someValue~";
cUID="someUserID"; // the value between quotation marks is my target
...=true;
window.name="~someName~";
...=window;
iUserRefresh=0;
cEnv="~some value~";
</SCRIPT>
...
我熟悉的XPath,HTML和Javascript基礎知識,但無法弄清楚什麼是這裏的最快,最簡單的方法。 我很感謝這裏的任何幫助/指導,謝謝。
? – starvator 2014-09-30 13:04:23
http://en.wikipedia.org/wiki/Variable_(computer_science) – Shomz 2014-09-30 13:05:10
此工具:http://smartbear.com/products/qa-tools/automated-testing-tools/? – 2014-09-30 13:09:39