cancel
Showing results for 
Search instead for 
Did you mean: 

There was an attempt to perform an action at point, which out of the window bounds

Contributor

There was an attempt to perform an action at point, which out of the window bounds

Hi,



I am trying to do DDT for radio button through excel.

There are three options with radio button, i need to select one option in each iteration and other two options are not selected.

Mentioned sample script below. If i run the below script, i am getting the below error at

Perpupilprice.Click(Drivera.Value("Per pupil price"));



There was an attempt to perform an action at point (0,-1), which out of the window bounds .



The window size is (20, 20); screen rectangle: the left top corner is (1022, 714), the right bottom corner is (1041, 733).

The screen coordinates of the point is (1022, 713).

I have checked in the forums , but i didn't find a solution.



Please help , how to resolve?



//Price by band

        pricebyband.Click(Drivera.Value("Price by band"));

   

// Per puipl price

   Perpupilprice.Click(Drivera.Value("Per pupil price"));

 

//Per unit price

   Perunitprice.Click(Drivera.Value("Per unit price"));



Excel data:



























Price by
band
per unit price Per pupil price
TRUE FALSE FALSE
FALSE TRUE FALSE
FALSE FALSE TRUE





Thanks and Regards,

Kish
2 REPLIES 2
Highlighted
Staff

RE: There was an attempt to perform an action at point, which out of the window bounds

Hi,



Click has three parameters - coordinates and the pressed 'shift' keys (see the Click Action help topic). You pass a single boolean value to it - this is incorrect.
------
Yuri
TestComplete Customer Care Engineer

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
Highlighted
Community Hero

RE: There was an attempt to perform an action at point, which out of the window bounds

If you want to get it to check on a particular radio button based upon the value in the Excel, I'd do the following:



/Price by band

if (VarToBool(Drivera.Value("Price by band")))

{

        pricebyband.Click();

}

if (VarToBool(Drivera.Value("Per pupil price")))

{

   Perpupilprice.Click(); 

}  

if (VarToBool(Drivera.Value("Per unit price")))

{

   Perunitprice.Click(); 

}




In my practical experience, though, I think most radio button controls actually map with a ClickButton method as well in which case all the "Click" calls in the above code could be replaced with ClickButton

Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available