18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Problem to access to html tag content
Hi
My test criteria here is if a particular word is present on the whole html page (including head section also)
It's mass test - script checks around 500 urls
It works fine for 95% of cases , but for the rest there is a problem
I get null instead of page content
The code that reproduces the problem is the following
=========================
<browser>
var GetWholeHTML = function(){
return document.documentElement.innerHTML;
}
</browser>
var ProcessTest = function() {
// I coud not post link because I'm new here
_navigateTo("http===french dot eurokingclub dot com");
var $elemStr;
try{
_set($elemStr , GetWholeHTML ());
}catch(e){
}
_alert($elemStr);
}
ProcessTest ();
===================
I'm using
windows 7
FF 14.0.1
sahi_v35_20110719
Also , if you have better idea how to get page contents , I'll appreciate
Thanks in advance
My test criteria here is if a particular word is present on the whole html page (including head section also)
It's mass test - script checks around 500 urls
It works fine for 95% of cases , but for the rest there is a problem
I get null instead of page content
The code that reproduces the problem is the following
=========================
<browser>
var GetWholeHTML = function(){
return document.documentElement.innerHTML;
}
</browser>
var ProcessTest = function() {
// I coud not post link because I'm new here
_navigateTo("http===french dot eurokingclub dot com");
var $elemStr;
try{
_set($elemStr , GetWholeHTML ());
}catch(e){
}
_alert($elemStr);
}
ProcessTest ();
===================
I'm using
windows 7
FF 14.0.1
sahi_v35_20110719
Also , if you have better idea how to get page contents , I'll appreciate
Thanks in advance
Comments
maybe this produces better results too
Are the pages which return null special in any way? maybe 404 pages?
Regards
Wormi
I tried your advise but
got null again
This is from Sahi Log:
setServerVar('___lastValue___1344522747189', _getText(null));
_alert(null);
damn, I have no idea then... sorry