Forum Discussion

Veroniquelu's avatar
Veroniquelu
Contributor
10 years ago

calling a function thru excel

Hi All

function a()

{

var webPageObj = Sys.Browser("iexplore*").Page("*");
Log.Message(webPageObj.URL)
var test= webPageObj.EvaluateXPath("//th[contains(@style, 'text-align: left;')]");
var arr = (new VBArray(test)).toArray();
}

 

My Code as above, when I ran the code alone, this is working. But if I call this function in an excel, test is null. And the URL I printed is different from when it's ran alone, the URL is the URL from previous page, that result in the webPageObj not finding anything. It looks like testcomplele did not capture one of my click action in the previous page. could anyone help me resolve this issue? 

 

 

Thanks,