Hi Lalit,

Let me wish you first Happy Diwali :).

Now answer to your problem can be as below:

If all are webelements inside the table then you can use Object.object
property of an object in QTP.

You can retrieve the webelement of the WebTable and use its Object property
which provides you access to use DOM properties of the any webelement.

This following example will help you understand this.

Create an html file with below code:

<html> <head> <style type="text/css"> h1 { text-align:center; } p.date {
text-align:right; } p.main { text-align:justify; } </style>

</head>

<body> <h1>CSS Align test</h1> <p class="date">May, 2009</p> <p
class="main">In my younger and more vulnerable years my father gave me some
advice that I've been turning over in my mind ever since.</p>
<p><b>Note:</b> Try to resize the browser window to see how justify
works.</p> </body>

</html>

Open the html file and then add the objects to OR.

Associate this with script.

Now in script call below statement.

MsgBox Browser("").Page(""). WebElement("html tag:=P", "innertext:=May,
2009").Object.CurrentStyle.textAlign

This will display the alignment.

Thank you!!!

Regards, Shantanu
On Nov 3, 2013 12:13 AM, <[email protected]> wrote:

>   Today's Topic Summary
>
> Group: http://groups.google.com/group/mercuryqtp/topics
>
>    - How to check the alignment of Data inside the 
> webTable?<#1421a2091525c779_group_thread_0>[3 Updates]
>    - How to get font color in a loop for 10 link 
> names<#1421a2091525c779_group_thread_1>[2 Updates]
>    - Unable to identify WebTable Object 
> runtime<#1421a2091525c779_group_thread_2>[1 Update]
>    - How to get all items from WinList 
> object<#1421a2091525c779_group_thread_3>[1 Update]
>
>   How to check the alignment of Data inside the 
> webTable?<http://groups.google.com/group/mercuryqtp/t/e90914cff1c0431f>
>
>    Lalit Aggarwal <[email protected]> Nov 01 11:20AM +0530
>
>    Hi All,
>
>    I need to check the alignment of all the data inside the webtable,
>    I am able to get the data from each row and column, but i am not able
>    to
>    get the RO property of any element (data) in side the webTable
>    Could anyone please help me in that?
>
>    Regards,
>    Lalit Aggarwal
>
>
>
>
>    Shantanu Joshi <[email protected]> Nov 02 06:59AM -0700
>
>    Hi Lalit,
>
>    I have some questions to ask you.
>    1. What do you want check by retreiving the RO property values.
>    2. What are the types of elements inside WebTable. i.e.
>    WebElement,Link etc.
>
>    I can help you with this if you let me know answers of the questions
>    above.
>
>    Enjoy Automation,
>    Shantanu
>
>    On Friday, 1 November 2013 11:20:55 UTC+5:30, Lalit Aggarwal wrote:
>
>
>
>
>    Lalit Aggarwal <[email protected]> Nov 02 09:12PM +0530
>
>    Hi Shantanu,
>
>    Thanks for reply,
>
>    Here are the answers of your questions
>    *1. What do you want check by retreiving the RO property values?*
>    Ans: Actually we need to check the alignment of Data present there in
>    webtable, so i was thinking to get "outertext" property or some other
>    property, still i could not find exact answer to how to check the
>    alignment
>    of data (webelements) just i am trying it? if you've any idea to check
>    the
>    alignment of all webelements present in webtable, please share me.
>
>    *2. What are the types of elements inside WebTable. i.e.
>    WebElement,Link
>    etc.*
>
>    Ans : All are WebElements.
>
>    I hope now picture is crystal clear to you.
>
>    Regards,
>    Lalit Aggarwal
>    9900329906
>
>
>    On Sat, Nov 2, 2013 at 7:29 PM, Shantanu Joshi
>
>
>
>   How to get font color in a loop for 10 link 
> names<http://groups.google.com/group/mercuryqtp/t/f79c5efabab0975c>
>
>    Vish <[email protected]> Nov 01 09:13PM -0700
>
>    Hi Surabhi,
>    Can I have your web page So I can give you exact code?
>
>    then, you just need to run from yourend.
>
>    Best Regards,
>    Vishal Shah
>
>    On Friday, 1 November 2013 00:43:05 UTC+5:30, surabhi wrote:
>
>
>
>
>    Shantanu Joshi <[email protected]> Nov 02 06:52AM -0700
>
>    Hi Surabhi,
>
>    U can follow both approaches. Either using OR/DP
>
>    Let me show you both methods:
>    Method 1: Using OR
>
>    I here assume that all the links are present on the same page.
>
>    msgbox = Browser("").Page("").link("").getroproperty("color")
>
>    repeat the same for all 10 links .This will return you a value in
>    hexadecimal value.
>
>
>    Compare the value and get the color of link.
>
>    for example 0000ff is the value for blue link.
>
>    Method 2:Using Descriptive Programming
>
>    Function ClickLink(LinkName)
>
>    Set oLink = Description.Create()
>    oLink("micclass").Value = "Link"
>    oLink("name").Value = LinkName
>
>    Set collection = browser("").page("").Childobjects(oLink)
>
>    For i = 0 to collection.count -1
>    ColorValue = collection(i).GetROProperty("color")
>    if StrComp(ColorValue,"ff0000") = 0 then
>    collection(i).Click
>    exit For
>    End If
>    next
>
>    End Function
>
>
>    I hope this helps.
>
>    Enjoy Automation
>    Shantanu
>
>
>    On Friday, 1 November 2013 00:43:05 UTC+5:30, surabhi wrote:
>
>
>
>   Unable to identify WebTable Object 
> runtime<http://groups.google.com/group/mercuryqtp/t/17920b202c2cd280>
>
>    Shantanu Joshi <[email protected]> Nov 02 06:13AM -0700
>
>    Hi All,
>
>    Thanks for the help.
>
>    The issue is solved using following code.
>
>    I used DP approach.
>
>    Set oName = Description.Create()
>    oName("micclass").Value = "WebTable"
>    oName("cols").Value = 2
>
>    Set FindTables = Browser("").Page("").ChildObjects(oName)
>    For i = 0 to FindTables.count -1
>    Rowcount = FindTables(i).RowCount
>    for j = 0 to RowCount -1
>    str = FindTables(i).GetCellData(j,2)
>    If strComp(Trim(str),"Shantanu") = 0 then
>    Set ObjWebCheckBox =
>    FindTable(i).ChildItem(j,2,"webCheckBox", 0)
>    ObjWebCheckBox.Click
>    Flag = 1
>    End If
>    Exit For
>    Next
>    if Flag = 1 then
>    Exit For
>    end If
>    next
>
>    Thanks for the guidance provided.
>
>
>    Enjoy Automation
>    Shantanu
>
>    On Saturday, 26 October 2013 00:37:05 UTC+5:30, Shantanu Joshi wrote:
>
>
>
>   How to get all items from WinList 
> object<http://groups.google.com/group/mercuryqtp/t/3a012587b0c8bfd5>
>
>    G Thind <[email protected]> Nov 01 01:03PM -0700
>
>    Hi Shalab,
>
>    your code worked like charm. What I need to understand is there a way
>    to
>    learn this coding for QTP. As I didn't understand your function and
>    half of
>    your code.
>
>    Please help.
>
>    Garry
>
>    On Wednesday, October 5, 2011 3:52:01 PM UTC-4, Shalabh Dixit wrote:
>
>
>
>  --
> --
> 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.
>

-- 
-- 
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.

Reply via email to