Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to set focus to a particular cell in the datatable?
#1
Not Solved
Hi,
Pls let me know as how to set focus to a particular cell in the data table.do we have any method to do so?

Thanks
Ashok
Reply
#2
Not Solved
Hi,
Below is the test case i have proceed.

1.Focus means (Ex: webedit object)
2.First find the particular cell consists of (Ex: A webedit name of "p_dev_release_found")
3. Then identify the number of edit fields available in that particular webtable (Here i have consider the object as webedit that is the reason i have calculated the webedit counut)
4.Write the for loop wherever this webedit title is matches in the webtable then focus the field i.e webedit field

By considering the above thing i generated a script...

Please look it may help you

Code:
Set odesc=Description.Create( )
    oDesc("micclass").Value = "WebEdit"
    oDesc("name").Value = "p_dev_release_found"
Set editcollection=Browser("xxxxxxxxxxxxxxxx").Page("xxxxxxxxxxxxxxxx").Frame("main").WebTable("Category").ChildObjects
Numberofedits=editcollection.count
msgbox Numberofedits
For i=0 to Numberofedits-1
    If editcollection(i).GetROProperty("Name")="p_dev_release_found" Then
        Browser("xxxxxxxxxxxxxxxx").Page("xxxxxxxxxxxxxxxx").Frame("main").WebEdit("name:=p_dev_release_found").Click
    End If
Next


Please let me know if i am wrong...

Thanks,
Venkat.Batchu
Reply
#3
Not Solved
@Venkat : Could you please look into the Question posted.
"Pls let me know as how to set focus to a particular cell in the data table.do we have any method to do so?"

Are you sure that your above way/solution would solve the mailashy78 Question ?
Reply
#4
Not Solved
Hi Sreekanth,
i have tried with the above example and observed that corresponding field has been focused so we will not have any problem but we have a easiest solution is

Code:
Set objedit=Browser("xxxxxxxxxxxxxxxx").Page("xxxxxxxxxxxxxxxx").Frame("main").WebTable("Category").Childitem(row,column,'Property",Index)  (Here property in the sense WebEdit)
objedit.click


Thanks,
Venkat.Batchu

Hey guys,
mailashy78 asked how to focus the particular cell in datatable not in application..

I misunderstood the concept.

sorry guys....
Reply
#5
Not Solved
We have only the setCurrentRow(index) method. It will select all cells in the index specified.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SendKeys changing focus to IE url when executed from framework psova 0 2,121 06-09-2015, 07:19 PM
Last Post: psova
  WebElement disappears on change of focus EGBELL 0 2,250 01-05-2015, 08:09 PM
Last Post: EGBELL
  Not able to do any operation on upper applet when focus is on lower applet. sonqtp 0 1,845 06-18-2012, 02:23 PM
Last Post: sonqtp
Question Output an object that currently has "focus" on the form D2010 1 3,338 08-04-2010, 03:25 PM
Last Post: D2010
  can Winrunner/QTP test java swing applications without application in focus. gauravraj 0 2,728 06-18-2009, 10:44 AM
Last Post: gauravraj

Forum Jump:


Users browsing this thread: 2 Guest(s)