Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to select a particular object in HTML table ?
#1
Not Solved
Hi all,

I recorded a script using the below mentioned statement:
Code:
JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SetCellData "#1","Select","1"

Now if i Run the script it throws an error syaing "The operation cannot be performed"

if i edit the statement to:
Code:
JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell "#1" ,"Select"

Then also i get the same error.

Kindly help me in resolution of the issue.
Thanks
Rachna
Reply
#2
Not Solved
I see from your subject that you are trying to select a value from the table, but from the code you are trying to set a value to the table.

Try this if your intention is only to select a cell,

Code:
JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell 1 ,"Select"

I presume "Select" is the text you want to select from the table ??

Sorry i misled. My bad.

Code:
JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell 1 ,"Select"

"Select" here is the name of the column and 1 is the first row.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#3
Not Solved
hi,
Thanks for the quick reply..

but it also didnt work and I am getting the same issue "The operation could not be performed"

Kindly provide me a solution for this issue asap.

Regards,
Rachna
Reply
#4
Not Solved
Try this then,

Javatable().Object.SelectCell Cint(1), "Select"
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#5
Not Solved
i tried using this:

Code:
objDescription =  JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint(1), "Select"
msgbox(objDescription)


It is giving syntax error.

and says the run cannot be completed
Expected end of statement
Line (117): "objDescription = JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint("1"), "Select"".
Reply
#6
Not Solved
It would for sure, Since you are selecting a cell and there is no return value for it. Please try with assigning a variable. Just like this,

Code:
JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint(1), "Select"
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#7
Not Solved
Code:
JavaWindow("Sales_BasicFlow").JavaDialog("Optional Service Selection").JavaTable("Select Services for 0000374914").SelectCell Cint(1), "Select"
this still givesm an error saying the operation cannot be performed.

Please ssee the screen shot attached...here from the pop up i need to select the first option in the popup


Attached Files Image(s)
   
Reply
#8
Not Solved
Thanks rachana. It would be more helpful if you can load the spy shot of the object you want to select. That can help me to drill further.
Basanth
Give a fish to a man and you feed him for a day..Teach a man how to fish and you feed him for life.
Reply
#9
Not Solved
please find spy shot attached.


Attached Files Image(s)
   
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Customized HTML reports in QTP azeem 11 48,308 12-31-2016, 02:57 PM
Last Post: chevronneraji
  [UFT] Get text into DIV through HTML tag robertosalemi 2 5,271 03-29-2016, 09:43 PM
Last Post: robertosalemi
  How to attach HTML file to Email Naresh 0 2,740 04-06-2015, 02:04 PM
Last Post: Naresh
  how to validate all lebel object in a table niketa 1 2,689 10-30-2014, 01:56 PM
Last Post: Ankesh
  User defined Objects(Can't map standard grid object in to table object ) madhavanr 0 2,477 01-14-2014, 03:46 PM
Last Post: madhavanr

Forum Jump:


Users browsing this thread: 2 Guest(s)