Forum Discussion

Nilam's avatar
Nilam
Occasional Contributor
9 years ago

Got error message:There was an attempt to perform an action on a zero-sized window.

 Hi,

 

We writting the  VB script  by using object ID. 

Not able click on the link "Logout".

Code is :

  page.NativeWebObject.Find("id", "logoutID", "a").Click

 

Got following error, after running the script

___________________

   Log:   There was an attempt to perform an action on a zero-sized window.

Add Info:  <script>// function writeContent(){ var c = document.getElementById("container"); c[("innerText" in c) ? "innerText" : "textContent"] = document.getElementById("dataIsland").innerHTML; }window.onload = writeContent; // </script> The window size is (0, 0); the screen rectangle: the left top corner is (0, 97), the right bottom corner is (0, 97). Tested object: Sys.Browser("firefox").Page("http://192.168.1.141:8080/CustomerPortal/buy_currency_confirmation.htm").Panel("main").Panel("wrapper").Header("header_top_div").Panel(0).Nav("main").Panel("user").Link("logoutID")

The window size is (0, 0); the screen rectangle: the left top corner is (0, 97), the right bottom corner is (0, 97).

Tested object:
Sys.Browser("firefox").Page("http://192.168.1.141:8080/CustomerPortal/buy_currency_confirmation.htm").Panel("main").Panel("wrapper").Header("header_top_div").Panel(0).Nav("main").Panel("user").Link("logoutID")

   

____________________________________________________________

 

We have used same code for other links which is working fine, only for "logout" link is not working.

Please help

 

Regards,

Nilam

 

 

1 Reply

  • Hi Nilam

     

    Is the 'VisibleOnScreen' property of the Object is 'True' in your object browser? Did you try using other properties such as ClassName or ObjectIdentifier instead of object Id? In some cases the object is identifed in two instances and so in that cases it is worth using array of properties in Find method in which 'VisibleOnScreen' must be used as one of the property. May be your reply gives the clear understanding of your condition to experts if not the above works.