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.
Javascript is thrown inspite of the URL presenti in exclude_inject.txt
Hi,
On a particular page in my web application, the moment i type a letter in a textbox, a javascript error is thrown. This happens only when i type the letter in that particular textbox.
The error is still thrown even after entering the error url in exclude_inject.txt.
Please advice ASAP as it is a show stopper issue for me.
Error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
Timestamp: Thu, 15 Dec 2011 10:32:51 UTC
Message: Object doesn't support this property or method
Line: 128
Char: 1
Code: 0
URI: http://URL:<port>/rapidbiz/services/editService.jsp
Message: 'filterFilename' is undefined
Line: 128
Char: 1
Code: 0
URI: http://URL:<port>/rapidbiz/services/editService.jsp
Browser: IE 8
OS: win 7
Sahi version: 3.5
Sahi build: 2011-07-19
On a particular page in my web application, the moment i type a letter in a textbox, a javascript error is thrown. This happens only when i type the letter in that particular textbox.
The error is still thrown even after entering the error url in exclude_inject.txt.
Please advice ASAP as it is a show stopper issue for me.
Error:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0)
Timestamp: Thu, 15 Dec 2011 10:32:51 UTC
Message: Object doesn't support this property or method
Line: 128
Char: 1
Code: 0
URI: http://URL:<port>/rapidbiz/services/editService.jsp
Message: 'filterFilename' is undefined
Line: 128
Char: 1
Code: 0
URI: http://URL:<port>/rapidbiz/services/editService.jsp
Browser: IE 8
OS: win 7
Sahi version: 3.5
Sahi build: 2011-07-19
Comments
Could you please let me know the pattern how you are adding the url in exclude_inject.txt.
Also, is it possible for you to share the URL?
Regards
Sumitra
Regarding the URL, its on my local system, so i will not be able to share with you.
Are there any log or traces that will be generated?
If this is the URL is:http://myapp/myajaxrequests.jsp?action=add,
then your regex may look like .*myajaxrequests[.]jsp.* which you will have to include into exclude_inject.txt.
So could you give the pattern of the url which you have included it in exclude_inject.txt.
Hope i am clear now.
Regards
Sumitra
This is the pattern of the URL: http://<IP address>:8080/rapidbiz/services/editService.jsp
please advice.
Sahi controls the browser by injecting javascript into web pages. However there are various requests like XMLHttpRequests, javascript, css, etc. where Sahi should not inject its code. While this is correctly detected and handled in most cases, there are instances where one may need to explicitly ask Sahi not to inject code. In such instances, regular expression patterns can be added to exclude_inject.txt. When a URL matches this pattern, Sahi will NOT inject its code.
For example while using ExtJS, Add
.*callback=.*
at the end of sahi/userdata/config/exclude_inject.txt,
restart Sahi, clear browser cache, and it should fix problems with AJAX and extjs.
You could determine the URL patterns using Firebug on Firefox, or using the Developer Tools on Internet Explorer. If neither of these works for you, enable traffic logging in Sahi and look at the various request responses.
Look at response.body_unmodified_xxx and response.body_modified_xxx to see if Sahi has injected code into the file. If yes, add the URL pattern to exclude_inject.txt
Note that the pattern needs to be a proper regular expression which will match the whole url. If your url is http://myapp/myajaxrequests.jsp?action=add, your regex may look like .*myajaxrequests[.]jsp.*
Let me know if you still face problem, we will have a desktop sharing.
Regards
Sumitra
This is the pattern of the URL:
http://<IP add>:8080/rapidbiz/dragDropEditor.do?method=dragDropEditor&appId=414
note: in the URL parameter "appId=414", the value of appId will keep changing dynamically.
Is there any common line that i can insert in exclude_inject to ensure that the javascript error doesnt come irrespective of the appId value?
Thanks.
Can you please include this :
.*dragDropEditor[.]do[?]method=dragDropEditor&appId=.* in exclude_inject.txt and restart Sahi.
Check if this solves your issue.
Regards
Sumitra
After adding your line of code, i get another script error: Webpage error details
Message: Object expected
Line: 77
Char: 3
Code: 0
URI: http://URL:PORT/rapidbiz/scripts/DDEditor/js/viewLinks.js
post which i added this url into exlcude_inject file. But inspite of adding it, the script error keeps coming.
Additionally i noted that on this page where the script error is thrown, there are a couple of combo box items. The drop down values of these combo box items displays Sahi code instead of the actual drop down values.
Please help me fix this problem asap.