Posts: 53
Threads: 7
Joined: May 2011
Reputation:
0
07-26-2011, 12:28 PM
(This post was last modified: 07-26-2011, 12:28 PM by souvikghosh_diatm.)
Well i am going to ask to all abt a very simple problem which i do not know...I have a text box and i have to check whether the focus is in that edit box or not....
Can any one gv me any idea that how can i check this scenario??? NOTE:: The focus is coming as pre filled on that field....So i can not set it before i check it......
Is there any method that i can Use????Need idea on URGENT basis plzzz....
Any idea or suggestion will xtreamly appreciated.....
------------
Thanx.
Posts: 53
Threads: 7
Joined: May 2011
Reputation:
0
07-27-2011, 04:49 PM
@@--rajpes ::
Thanx a lot for your precious suggestion, but i think u did not undrstnd my requirement....i just need to check whether there is any focus on that particular text box or not....
U hv send me d code of to check the length of value present in text box, n if it is zero then set something....that is not required boss....i dnt have to set any thing....just hv to check d focus is there or not....
By d way i hav find out d solution by doing trial n error method for it to check whether focus is there on any particular text field or not....
Thanx once again.....
Posts: 275
Threads: 4
Joined: Jul 2011
Reputation:
0
07-27-2011, 09:04 PM
Ok please share what solution you have found.how do you check focus on an object
Posts: 53
Threads: 7
Joined: May 2011
Reputation:
0
07-28-2011, 01:51 AM
Well, not on an object...i tried it on edit box only....I did not think it would be so simple....
tried d following...
Browser("B").Page("P").WebEdit("WE").GetROProperty("Focus")
It will return 0 or 1...if 1 then focus is present, Else not....
Hope its d permanent solution for every application....Tried it on GWT and its working fine....
Let me know if it is working for all or not.....
-----------
Thanx.
Posts: 275
Threads: 4
Joined: Jul 2011
Reputation:
0
07-28-2011, 02:54 PM
Thats amazing. Though spy doesnot show this property it works fine
Posts: 53
Threads: 7
Joined: May 2011
Reputation:
0
07-28-2011, 04:03 PM
(This post was last modified: 07-28-2011, 04:09 PM by souvikghosh_diatm.)
Ya i know spy does not show this...Actually i got it by doing trial and error method....I also did not know dat it would work as d permanent solution for me......ha ha...cheers dude......
-----------
Thanx.