Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Data Table and descriptive programing
#1
Solved: 11 Years, 4 Months ago
Hi i am trying to combine datatable usage and descriptive programming. And its not working so far, can you help.
my code is osmething like this -
Code:
Browser("micclass:=Browser").Page("micclass:=Page").Link("text:="Datatable("Menuitems",dtGlobalsheet")).Click

I keep getting syntax error.
Reply
#2
Solved: 11 Years, 4 Months ago
HI Laura,

Concatenation Operator(&) is misssing.

Try as given below.

Code:
Browser("micclass:=Browser").Page("micclass:=Page").Link("Text:="&Datatable("Menuitems",dtGlobalsheet)).Click
Reply
#3
Solved: 11 Years, 4 Months ago

Thanks. Also tried another but it wasnt looping, that is i had more than 1 item in the datatable but it picking just the first item on the datatable. The code is as follows -

Code:
myLink = DataTable("MenuItems", dtGlobalSheet)
Browser("micclass:=Browser").Page("micclass:=Page").Link("name:="&myLink).Click.

How do I get this code to pick all the data witihin the datat sheet. I did selecte 'run all iterations'within file, and settings option.
Reply
#4
Solved: 11 Years, 4 Months ago Exclamation 
I am also facing the same problem.. Any help would be highly appreciated.
Thanks
Reply
#5
Solved: 11 Years, 4 Months ago

Thanks. Also tried another but it wasnt looping, that is i had more than 1 item in the datatable but it picking just the first item on the datatable. The code is as follows -

Code:
myLink = DataTable("MenuItems", dtGlobalSheet)
Browser("micclass:=Browser").Page("micclass:=Page").Link("name:="&myLink).Click.

How do I get this code to pick all the data witihin the datat sheet. I did selecte 'run all iterations'within file, and settings option.







(06-23-2009, 02:11 AM)laura Wrote:
(06-22-2009, 11:37 PM)sreekanth chilam Wrote: HI Laura,

Concatenation Operator(&) is misssing.

Try as given below.

Browser("micclass:=Browser").Page("micclass:=Page").Link("Text:="&Datatable("Menuitems",dtGlobalsheet)).Click
[/quote]


Thanks that worked but just like I said earlier it does not loop through the whole data table contents even with the '[run all iterations' option chosen.
Can you please help.

thanks
Reply
#6
Solved: 11 Years, 4 Months ago
Hi Laura,
Please use the for loop for looping and datatable.setcurrentrow to set the focus to the specific row.

Try the following code
Code:
for i=1 to Datatable.LocalSheet(or GlobalSheet).GetRowCount
  Datatable.LocalSheet(or GlobalSheet).SetCurrentRow i
  Browser("micclass:=Browser").Page("micclass:=Page").Link("Text:="&Datatable("Menuitems",dtGlobalsheet)).Click
Next

Hope this helps!!

Thanks,
Reply
#7
Solved: 11 Years, 4 Months ago
Yes it did. Thanks.
Reply
#8
Solved: 11 Years, 4 Months ago
You are welcome
Reply
#9
Solved: 11 Years, 4 Months ago
Another obtacle this morning is I have a link which takes up the name of whoever is logged on to the page.
e.g if user 1 is logged on the name of the link name becomes welcome user1.
I have tried usig dp, but the location of the link changes dependednt on which environment i am in. How do you think i can get round this.

The 2nd issue with this is also I hae to get the name of who is logged on and use it as input somewhere else, but depending on who is logged on if i use this code - a = Right(var,6) the length of username varies so sometimes it works and someimes it doesent.
Any ideas on this 2 issues please?
Thanks
Reply
#10
Solved: 11 Years, 4 Months ago
Hi laura,

I can't understand your question clearly. Can you please explain in detail?

Thanks,
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Help with Select checkbox from data table value jayraocourts 0 1,256 11-01-2019, 10:25 PM
Last Post: jayraocourts
  Descriptive programing kedala 1 2,750 10-04-2016, 09:25 PM
Last Post: venkatesh9032
  How to get center data value in a odd number of rows and columns web table ... sai rajesh 0 2,801 11-13-2013, 10:24 PM
Last Post: sai rajesh
  DP is not returning the whole table data content soumen 6 5,153 10-02-2013, 12:05 PM
Last Post: vvcyril
  Web Table Descriptive Language karraaruna 3 3,473 07-04-2013, 08:06 PM
Last Post: karraaruna

Forum Jump:


Users browsing this thread: 2 Guest(s)