This project is read-only.

Not able to click the html table header control

Oct 20, 2012 at 1:07 AM

Hi,

I have a table with header columns clickable. HTMLTable.getHeaderColums() is returning null.

Attacked is the screen captures of the html control and UI. I tried following code. But it is throwing an error not able to find the control. Really appreciate your help ..
UITestControl HtmlTableHeader = new UITestControl(pgUsageSummary);
HtmlTableHeader.TechnologyName= "MSAA";
HtmlTableHeader.ControlType.Equals(HtmlTableHeader);
HtmlTableHeader.SearchProperties.Add("Id", "9/1/2012 12:00:00 AM", "Onclick", "highlightColumn('colOne', 'colTwo', 'colThree','#C9FBFF')");
HtmlTableHeader.EnsureClickable();
Thanks,
Sailaja



--
Thanks,
Sailaja Nalamati
Oct 21, 2012 at 3:44 AM

I just checked in some code to add support for HtmlHeaderCell wrapped using CUITe_HtmlHeaderCell.
I've added two public methods to CUITe_HtmlTable:
FindHeaderAndClick(int iRow, int iCol)
GetHeader(int iRow, int iCol)

I've added sample code to the integration test HtmlTable_ClickOnColumnHeader_Succeeds()

Oct 22, 2012 at 3:12 AM
Thank you for your response. I am getting nullreference exception. Appreciate your help in this. Please let me know, If you need any specific details.
pgUsageSummary.tblQuarterlyTable.FindHeaderAndClick(0, 2);
Thanks,
Sailaja


On Sat, Oct 20, 2012 at 7:45 PM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

I just checked in some code to add support for HtmlHeaderCell wrapped using CUITe_HtmlHeaderCell.
I've added two public methods to CUITe_HtmlTable:
FindHeaderAndClick(int iRow, int iCol)
GetHeader(int iRow, int iCol)

I've added sample code to the integration test HtmlTable_ClickOnColumnHeader_Succeeds()

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati
Oct 22, 2012 at 3:26 AM

What does the html of tblQuarterlyTable look like?

Oct 22, 2012 at 4:51 AM
Thank a lot for quick response. I have attached two files one is htmltable and another one is how it looks in UI. Pls let me know, if you need any further details.
Thanks,
Sailaja

On Sun, Oct 21, 2012 at 7:26 PM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

What does the html of tblQuarterlyTable look like?

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati
Oct 22, 2012 at 5:13 AM

Sorry the attachments through email do not get posted on codeplex.

Oct 22, 2012 at 5:31 AM
Hi,
codeplex is not supporting to send attachments. Do you have any email that I can send the attachments ?
Thanks,
Sailaja

On Sun, Oct 21, 2012 at 7:26 PM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

What does the html of tblQuarterlyTable look like?

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati
Oct 22, 2012 at 5:36 AM

You can just put the html in the body of your email or use the "Insert Code Snippet" feature in the reply on codeplex.

I recommend only pasting the minimum amount of html that can reproduce the issue.

Oct 22, 2012 at 5:42 AM
Here is the HTML table . Thanks !


Text - Empty Text Node



Text - Empty Text Node


On Sun, Oct 21, 2012 at 9:36 PM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

You can just put the html in the body of your email or use the "Insert Code Snippet" feature in the reply on codeplex.

I recommend only pasting the minimum amount of html that can reproduce the issue.

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati


Commitment
Text - Empty Text Node

Text - September
Text - Empty Text Node

Text - October

Text - November

Text - Total
Oct 22, 2012 at 5:49 AM

You'll have to encode the html if you send it in an html encoded email.

Or just use the "Insert Code Snippet" feature in a reply on codeplex.

Oct 22, 2012 at 6:59 AM
Sorry! I am resending.

<table class="summary" id="QuarterlyTable" style="width: 100%;">


 Text - Empty Text Node
 <tbody>
   <tr> 
  Text - Empty Text Node
        <td>
   <b>
     Commitment   
  Text - Empty Text Node
 <th class="" id="9/1/2012 12:00:00 AM" onclick="highlightColumn('colOne', 'colTwo', 'colThree','#C9FBFF')">
    Text - September
         Text - Empty Text Node
 <th class="" id="10/1/2012 12:00:00 AM" onclick="highlightColumn('colTwo', 'colOne', 'colThree','#C9FBFF')">
   Text - October
 <th class="" id="11/1/2012 12:00:00 AM" onclick="highlightColumn('colThree', 'colOne', 'colTwo','#C9FBFF')">
   Text - November
  <td class="center">
    Text - Total
   <tr> 



Text - Empty Text Node Text - Empty Text Node
Commitment Text - Empty Text Node Text - September Text - Empty Text Node Text - October Text - November Text - Total
Oct 22, 2012 at 7:30 AM

It still didn't come out right.

You can try using http://pastebin.com and then posting the link.

Oct 22, 2012 at 2:54 PM
I pasted in pastedbin, with name "Sailaja, QuarterlyTable". Pls let m know. If you could able to see this. Thanks!

On Sun, Oct 21, 2012 at 11:30 PM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

It still didn't come out right.

You can try using http://pastebin.com and then posting the link.

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati
Oct 22, 2012 at 3:01 PM
Pls look in http://pastebin.com/archive/html5.Thanks!

On Mon, Oct 22, 2012 at 6:54 AM, Sailaja Nalamati <sailu.10@gmail.com> wrote:
I pasted in pastedbin, with name "Sailaja, QuarterlyTable". Pls let m know. If you could able to see this. Thanks!


On Sun, Oct 21, 2012 at 11:30 PM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

It still didn't come out right.

You can try using http://pastebin.com and then posting the link.

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati



--
Thanks,
Sailaja Nalamati
Oct 22, 2012 at 5:09 PM

http://pastebin.com/DWmDKSyD

Oct 22, 2012 at 5:51 PM
Yes, That's the one. Thanks!

On Mon, Oct 22, 2012 at 9:09 AM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati
Oct 23, 2012 at 8:50 AM

Sorry, that's not valid html.

I've noticed that the html must be valid for Visual Studio Coded UI Test Recorder to work and Coded UI Tests to playback correctly.

Make sure the html passes xhtml 1.0 validation.

For example, copying and pasting that html segment within the body of a new html file in Visual Studio produces the following warnings:

Warning    1    Validation (XHTML 1.0 Transitional): Text is not allowed between the opening and closing tags for element table'.    HTMLPage1.htm    7    7   
Warning    2    Validation (XHTML 1.0 Transitional): Element 'table' is missing its closing tag.    HTMLPage1.htm    7    7   
Warning    3    Validation (XHTML 1.0 Transitional): Element 'tbody' is missing its closing tag.    HTMLPage1.htm    9    11   
Warning    4    Validation (XHTML 1.0 Transitional): Text is not allowed between the opening and closing tags for element tr'.    HTMLPage1.htm    10    13   
Warning    5    Validation (XHTML 1.0 Transitional): Element 'tr' is missing its closing tag.    HTMLPage1.htm    10    13   
Warning    6    Validation (XHTML 1.0 Transitional): Element 'td' is missing its closing tag.    HTMLPage1.htm    12    18   
Warning    7    Validation (XHTML 1.0 Transitional): Element 'b' is missing its closing tag.    HTMLPage1.htm    13    13   
Warning    8    Validation (XHTML 1.0 Transitional): Element 'th' cannot be nested within element 'b'.    HTMLPage1.htm    16    11   
Warning    9    Validation (XHTML 1.0 Transitional): Element 'th' is missing its closing tag.    HTMLPage1.htm    16    11   
Warning    10    Validation (XHTML 1.0 Transitional): Element 'th' cannot be nested within element 'th'.    HTMLPage1.htm    19    11   
Warning    11    Validation (XHTML 1.0 Transitional): Element 'th' is missing its closing tag.    HTMLPage1.htm    19    11   
Warning    12    Validation (XHTML 1.0 Transitional): Element 'th' cannot be nested within element 'th'.    HTMLPage1.htm    21    11   
Warning    13    Validation (XHTML 1.0 Transitional): Element 'th' is missing its closing tag.    HTMLPage1.htm    21    11   
Warning    14    Validation (XHTML 1.0 Transitional): Element 'td' cannot be nested within element 'th'.    HTMLPage1.htm    23    11   
Warning    15    Validation (XHTML 1.0 Transitional): Element 'td' is missing its closing tag.    HTMLPage1.htm    23    11   
Warning    16    Validation (XHTML 1.0 Transitional): Element 'tr' cannot be nested within element 'td'.    HTMLPage1.htm    25    13   
Warning    17    Validation (XHTML 1.0 Transitional): Element 'tr' is missing its closing tag.    HTMLPage1.htm    25    13   

Oct 23, 2012 at 3:46 PM
Sorry about that. I have pasted the entire table. http://pastebin.com/w7hg0Rr6. Hope this will work. Appreciate your efforts. Thanks!


On Tue, Oct 23, 2012 at 12:51 AM, icnocop <notifications@codeplex.com> wrote:

From: icnocop

Sorry, that's not valid html.

I've noticed that the html must be valid for Visual Studio Coded UI Test Recorder to work and Coded UI Tests to playback correctly.

Make sure the html passes xhtml 1.0 validation.

For example, copying and pasting that html segment within the body of a new html file in Visual Studio produces the following warnings:

Warning 1 Validation (XHTML 1.0 Transitional): Text is not allowed between the opening and closing tags for element table'. HTMLPage1.htm 7 7
Warning 2 Validation (XHTML 1.0 Transitional): Element 'table' is missing its closing tag. HTMLPage1.htm 7 7
Warning 3 Validation (XHTML 1.0 Transitional): Element 'tbody' is missing its closing tag. HTMLPage1.htm 9 11
Warning 4 Validation (XHTML 1.0 Transitional): Text is not allowed between the opening and closing tags for element tr'. HTMLPage1.htm 10 13
Warning 5 Validation (XHTML 1.0 Transitional): Element 'tr' is missing its closing tag. HTMLPage1.htm 10 13
Warning 6 Validation (XHTML 1.0 Transitional): Element 'td' is missing its closing tag. HTMLPage1.htm 12 18
Warning 7 Validation (XHTML 1.0 Transitional): Element 'b' is missing its closing tag. HTMLPage1.htm 13 13
Warning 8 Validation (XHTML 1.0 Transitional): Element 'th' cannot be nested within element 'b'. HTMLPage1.htm 16 11
Warning 9 Validation (XHTML 1.0 Transitional): Element 'th' is missing its closing tag. HTMLPage1.htm 16 11
Warning 10 Validation (XHTML 1.0 Transitional): Element 'th' cannot be nested within element 'th'. HTMLPage1.htm 19 11
Warning 11 Validation (XHTML 1.0 Transitional): Element 'th' is missing its closing tag. HTMLPage1.htm 19 11
Warning 12 Validation (XHTML 1.0 Transitional): Element 'th' cannot be nested within element 'th'. HTMLPage1.htm 21 11
Warning 13 Validation (XHTML 1.0 Transitional): Element 'th' is missing its closing tag. HTMLPage1.htm 21 11
Warning 14 Validation (XHTML 1.0 Transitional): Element 'td' cannot be nested within element 'th'. HTMLPage1.htm 23 11
Warning 15 Validation (XHTML 1.0 Transitional): Element 'td' is missing its closing tag. HTMLPage1.htm 23 11
Warning 16 Validation (XHTML 1.0 Transitional): Element 'tr' cannot be nested within element 'td'. HTMLPage1.htm 25 13
Warning 17 Validation (XHTML 1.0 Transitional): Element 'tr' is missing its closing tag. HTMLPage1.htm 25 13

Read the full discussion online.

To add a post to this discussion, reply to this email (cuite@discussions.codeplex.com)

To start a new discussion for this project, email cuite@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com




--
Thanks,
Sailaja Nalamati
Oct 25, 2012 at 10:15 AM

I've just checked in a fix; please try with the latest code.

I've created a unit test HtmlTable_FindHeaderAndClick_Succeeds to exercise the expected behavior.

Oct 25, 2012 at 5:34 PM

Awesome. This is working now. Thanks a lot for unblocking me on this. Really appreciate your help. Thanks!