Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identify the Button in a Web table
#1
Not Solved Sad 
Hi all,

Here is one question that keep on making my face like this - Sad

There is one web table with n' no of rows and columns. Its first column is with Radio button or check boxes and its last(it can be any) column is with a button or link. As an input we are passing one value in first column. We need to select one check box and click on the button of that row in the last column.

Eg.

WebTable - Donations
First column - Account Names
Last Column - Donate. (Buttons)

Here We are passing the Account Name. Check boxes are displayed with account names. So select the particular check box and click on Donate button from the last column of the selected account.

I hope the question is clear..

Please help..
Thanx
Reply
#2
Not Solved
HI spsraj,

You can use the GetRowWithCellText method to work with these scenarios.

Code:
ClickWebButtonInWT "12345"
Public Function ClickWebButtonInWT(strAccNumber)
blnAccountNames = False
blnDonate = False
For ColCount = 1 to object.ColumnCount(1) ' To get the number of columns.
  If trim(object.GetCellData(1,ColCount)) = "Account Names" Then
    ColAccountNames = ColCount
    blnAccountNames = True
  ElseIf trim(object.GetCellData(1,ColCount)) = "Donate" Then
    ColDonate = ColCount
    blnDonate = True
  End If
If blnAccountNames = True and blnDonate = True Then
  Exit For
End If
Next

IntRowNum = object.GetRowWithCellText (strAccNumber,ColAccountNames)
Set objWB =  object.ChildItem(IntRowNum ,ColAccountNames,"WebButton",0)
objWB.Highlight
objWB.Click
Set objWB = Nothing
End Function

Please let me know if you need any more info.
Thanks,
SUpputuri
Reply
#3
Not Solved
Code:
Loc_Index=Browser("title:=XXX").WebTable("html tag:=TABLE","index:=1").GetRowWithCellText(trim(Accountname))
    Browser("title:=xxx").WebRadioGroup("name:=rdLocation").Select "#"&Loc_index
Reply
#4
Not Solved
HI Aravindln,

Do you think the sol'n provided by you will solve the isse.....????
Thanks,
SUpputuri
Reply
#5
Not Solved
Hi,
Yes here I am getting the index value of that checkbox and clicking on the concerned check box...In my project I am using the same for radio button, Note: It gives count value as little bit extra. bcoz it counts the column headers also in web table .so use (index - headers count in web table)
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Web Table debakanta 6 5,688 06-15-2015, 04:41 PM
Last Post: AMIT35352

Forum Jump:


Users browsing this thread: 1 Guest(s)