Hello,
I cannot seem to figure out to why the below code is not working when
detect the value in a row and should click on the Add button. Any help is
greatly appreciated.
RowCount = Browser("Login").Page("Communicatio_3").WebTable("Document
number").RowCount
For i = 1 to RowCount
Values = Browser("Login").Page("Communicatio_3").WebTable("Document
number").GetCellData(i,4)
If Datatable("Supp_Doc",dtLocalSheet) = Values Then
Browser("Login").Page("Communicatio_3").Image("image type:=Image Link",
"index:="&i).Click
Exit for
End If
Next
On Thursday, July 25, 2013 8:04:27 AM UTC-4, Akhalesh Yadav wrote:
> Hi Mary,
> As per your respective query, i would suggest you this
> logic...when you will get the total no. of rows
> x= Browser("Br").Page("Pg").WebTable("1").RowCount
> now you have to need to check each row to match with your specific value
> through for loop
> for i=0 to x
> UI_value=Browser("Br").Page("Pg").webtable("1").getcelldata(i,1) '
> here you can use column no 2 or 3 instaed of 1
> if specificValue=UI_value then
> Browser("Br").Page("Pg").webcheckbox("index:="&i).set "ON"
> else
> do nothing
> end if
> next
>
>
>
> Thanks
> Akhalesh
>
>
>
> On Thu, Jul 25, 2013 at 11:23 AM, Mary <[email protected]
> <javascript:>>wrote:
>
>> Thanks all,
>>
>> I have used the below statement and it returns 1. But there are 50
>> visible rows in the grid and i have checkboxes for each row. If i count
>> number of checkboxes in the table - it gives 50 correctly. But while
>> counting rows it give 1. Please give me some suggestion to identify the
>> each row. I need to select checkbox for the specific rows based on the
>> value of another column.
>>
>> x= Browser("Br").Page("Pg").WebTable("1").RowCount
>> msgbox x
>>
>>
>>
>> On Wednesday, July 24, 2013 5:01:30 PM UTC+5:30, Akhalesh Yadav wrote:
>>
>>> Hi Mary,
>>> No need to explain the more property for webtable, just you
>>> can define name, html tag and micclass of webtable. you can use inbuilt
>>> method getrowcount for webtable.
>>> Rcount=Browser("br").Page("pg").WebTable(WebTbl).getrowcount
>>>
>>>
>>> Thanks
>>> Akhalesh
>>>
>>>
>>> On Wed, Jul 24, 2013 at 3:38 PM, Mary <[email protected]> wrote:
>>>
>>>> I have a webtable in which there are 50 rows and 15 columns. But if i
>>>> use Rowcount, columncount it gives 1. But i need to check a checkbox in
>>>> the
>>>> grid for a specific row.
>>>>
>>>> Set WebTbl=description.Create()
>>>> WebTbl("micclass").Value="WebTable"
>>>> WebTbl("html tag").Value="TABLE"
>>>> WebTbl("name").Value="2"
>>>> WebTbl("x").Value="170"
>>>> 'WebTbl("abx_y").Value="159"
>>>> 'WebTbl("column names")="1234Select all.*"
>>>> Set d=Browser("br").Page("pg").WebTable(WebTbl)
>>>> Numberofrows = d.RowCount
>>>>
>>>> --
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> "QTP - HP Quick Test Professional - Automated Software Testing"
>>>> group.
>>>> To post to this group, send email to [email protected]
>>>>
>>>> To unsubscribe from this group, send email to
>>>> [email protected]
>>>>
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/MercuryQTP?hl=en
>>>>
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "QTP - HP Quick Test Professional - Automated Software Testing"
>>>> group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>>
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Akhalesh yadav
>>> +919555717928
>>> +919310680659
>>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]<javascript:>
>> To unsubscribe from this group, send email to
>> [email protected] <javascript:>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "QTP - HP Quick Test Professional - Automated Software Testing" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>
>
>
> --
> Akhalesh yadav
> +919555717928
> +919310680659
>
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en
---
You received this message because you are subscribed to the Google Groups "QTP
- HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.