Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Need help..
#1
Not Solved Exclamation 
I am using QTP 11 demo version and have one GWT 2.4 application. Here one check box is identified by QTP as an Image. The problem is that i am unable to make it checked by QTP. i have applied following different approach but i am still not successful. The only unique property for that image i found its "file name" and "Index". but its not be identified by only index value. and the file name is changing on different run session. But the interesting thing is that if i add that object in repository and drag drop it on action then its working absolutely fine. But in DP aproach its not working. Please refer my attached screen shot for better understanding.


I have applied:
Code:
Browser("CreationTime:=0").Page("title:=DIBAC").Image("file name:=unchecked.png","index:=46").Click

but it does not works. No runtime error found but click method not make it as checked.


also applied-

Code:
Set obj = CreateObject ("Mercury.DeviceReplay")
absx =Browser("CreationTime:=0").Page("title:=DIBAC").Image("file name:=unchecked.png","index:=46").GetROProperty("abs_x")
absy = Browser("CreationTime:=0").Page("title:=DIBAC").Image("file name:=unchecked.png","index:=46").GetROProperty("abs_y")
obj.MouseMove absx, absy
obj.MouseClick absx, absy, LEFT_MOUSE_BUTTON


But it also not works....No error found but check box not checked.



If i drag drop the object from OR then the following code is generating--

Code:
Browser("DIBAC").Page("DIBAC").Image("blank").Click



Any solution or suggestion will be appreciated...Mail me on - souvikghosh_diatm@rediffmail.com


Attached Files Image(s)
   
Reply
#2
Not Solved
Hi ,

It seems the objects are embedded within a WebTable.
In that case you have to use "ChildItem" method to perform operations on embedded objects.
Go through the "ChildItem" method in QTP help file for more information.

Ex:
Code:
Browser("DIBAC").Page("DIBAC").WebTable("Federal flag").ChildItem(1,2,"Image",0).Click

Reply
#3
Not Solved
I think you can also make use of the Virtual Object concept and map the image to a check box class..

I am also not sure why are you using creation time property. are you opening similar sessions of the application.

Again Virtual Object or using Child object concept may falter if there is a change in your application.
Reply
#4
Not Solved
This is new way of putting check box, we need to fire MouseDown and MouseUp event on the Image inorder to Check the Box. (Internally they use 2 images one for Uncheck and another for Check). Let me know iif you need any help in doing MouseDown.

One in QTP11 you can use JavaScript using which it is easy to fire MouseDown and MouseUp
Reply
#5
Not Solved
Thanx all for giving me the necessary tips.

@@sreekanth chilam :: I did not proceed with childItem. I simply wrote a function which click on any image. And when i called it from action it works properly. Though its taking some more time to perform click method. But still i do have one problem mentioned later.

@@deepaksporty :: I tried with mapping the image as check box and applied click method on it but same happening as it was happening before. no runtime error occurring, but the check box is not getting checked. And i used creation time property as it always an unique property of browser when no other browser is opened. That's why. It can be replaced with other properties.

@@surya_7mar :: Boss i am a new member, not have much more idea about all the methods of QTP. I'm trying my best to gather all knowledge regarding QTP. i am unable to understand your suggestion boss. it simply blows out over my head. Can u please elaborate??



I have written a function which can click on each image. Given 3 properties of the image-Check box and called that function from action. It works properly. Though its very time consuming approach. But the problem is that, if the browser is not maximized then this approach working properly. But if it is maximized then QTP clicking on some other image instead of clicking on that checkbox image. I could not understand why its happening as i have mentioned 3 properties of that checkbox image and checked that index property is purely different from that other image where QTP is clicking if the browser is maximized.

Can any body explain me the logic why its happening and what would be the nearby solution???
Any solution or suggestion will be appreciated...Mail me on - souvikghosh_diatm@rediffmail.com
Reply
#6
Not Solved
Any solutions??????????
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)