validate Entire table Text(comes on mouseover) in 1 step

Ranorex Spy, Recorder, and Studio.
Shruti
Posts: 25
Joined: Thu Sep 06, 2012 9:13 am

validate Entire table Text(comes on mouseover) in 1 step

Post by Shruti » Thu Sep 06, 2012 11:09 am

Hello,

I am trying Ranorex to check if it works well for automating tests for my website.

In the site, we are having some links that show a popup containing some information on mouse over.
I have to validate this information. Please refer the attached image file.
Multiple_values.png
Multiple_values.png (10.29 KiB) Viewed 1530 times
From the developer tool, I am getting following information:

<a onmouseover="ShowPopUp(this,'<table><tr><td>[[Image: Landscape2.jpeg]] [[Image: Landscape1.jpg...</td><td>12</td></tr><tr><td>[BLANK]</td><td>12</td></tr><tr><td>Landscaping Considerations</td><td>12</td></tr><tr><td>[BLANK]</td><td>12</td></tr><tr><td>April 1, 2012</td><td>12</td></tr><tr><td>[BLANK]</td><td>12</td></tr><tr><td>Landscaping can be a pleasurable and rewarding exp...</td><td>12</td></tr><tr><td>Landscaping as a Weather Barrier</td><td>10</td></tr><tr><td>When designing landscaping as a weather deterrent,...</td><td>12</td></tr><tr><td>Landscape garden hedges can be formal or informal ...</td><td>12</td></tr><tr><td>Time is also a factor when selecting weather-resis...</td><td>12</td></tr><tr><td>Willow hybrid</td><td>12</td></tr><tr><td>American Holly</td><td>12</td></tr><tr><td>Lombardy Poplar</td><td>12</td></tr><tr><td>Landscaping that Attracts Butterflies</td><td>12</td></tr><tr><td>[[Image: Picture 6]] </td><td>12</td></tr><tr><td>Landscape design is not limited to the selection o...</td><td>12</td></tr><tr><td>Planting nectar flowers for butterflies and food p...</td><td>12</td></tr><tr><td>Planting flowers in abundance.</td><td>12</td></tr><tr><td>Selecting flower-species of various heights—some b...</td><td>12</td></tr><tr><td>Including flowers that bloom at various times of t...</td><td>12</td></tr><tr><td>In addition to the above steps, it is important to...</td><td>12</td></tr><tr><td>Landscaping to Minimize Water Use</td><td>12</td></tr><tr><td>One final consideration when designing a landscape...</td><td>12</td></tr><tr><td>When developing a water-conscious landscape, “Plan...</td><td>12</td></tr><tr><td>Regardless of what individual preferences determin...</td><td>12</td></tr><tr><td>[BLANK]</td><td>12</td></tr><tr><td>[BLANK]</td><td>12</td></tr></table>')" jQuery1704521690633913788="395">


The only way I am getting now to validate this information is to validate each cell text. But as there are too many cells and I need to validate similar info at a number of other places also, this way wont be suitable for me.
I would like to know if there is some way to validate the entire table information(entire text) in a single step.....OR some way to get information about the script(the code) used for "onmouseover" event.


Thanks and Regards,
Shruti

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: validate Entire table Text(comes on mouseover) in 1 step

Post by Support Team » Sat Sep 08, 2012 10:23 am

Hello Shruti,

You will need some UserCode to solve your issue. You could iterate throw the cells using, e.g. a 'foreach' loop and validate each cell.

Regards,
Bernhard
Ranorex Support Team
.
Image

Shruti
Posts: 25
Joined: Thu Sep 06, 2012 9:13 am

Re: validate Entire table Text(comes on mouseover) in 1 step

Post by Shruti » Mon Sep 10, 2012 11:43 am

Hello Bernhard,

Thanks for the response.
But as I have to validate the cell texts, this solution is not feasible for me. I need the cell text to be stored somewhere so that I can compare the values during playback against it.
I can use a "for each" loop for comparing values but still I need some way to store the cell text also.(As, I have told earlier, recording and validating each cell individually wont be a good idea for me).

Is there any way to know about what information is present in the code for "onmouseover" event.?

Thanks in advance

Regards,
Shruti

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: validate Entire table Text(comes on mouseover) in 1 step

Post by Support Team » Tue Sep 11, 2012 10:00 am

Hi,
Support Team wrote:Is there any way to know about what information is present in the code for "onmouseover" event.?
You can access the value of the "onmousover" attribute of your webelement using following code snippet:
repo.<yourAppFolder>.<yourWebElement>.Element.GetAttributeValue("onmouseover").ToString()
Regards,
Tobias
Ranorex Team
.
Image

Shruti
Posts: 25
Joined: Thu Sep 06, 2012 9:13 am

Re: validate Entire table Text(comes on mouseover) in 1 step

Post by Shruti » Tue Sep 11, 2012 1:58 pm

Hi Tobias,

Thanks for the reply.
Your post was helpful.
Also, I recently noticed that the element itself is showing a dynamic attribute "onmousehover"...that can be easily used to validate the information I need.

Thanks and regards,
Shruti

Shruti
Posts: 25
Joined: Thu Sep 06, 2012 9:13 am

Re: validate Entire table Text(comes on mouseover) in 1 step

Post by Shruti » Mon Sep 17, 2012 12:31 pm

Hello All,

I the above mentioned case, my problem was solved as the table to be validated appeared on mouse over.
(I validated the dynamic property "onmouseover").


But, If the webpage contains a table or Div(some static content on page), Is there any way to validate the entire table text info in one go?

Thanks and Regards,
Shruti

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: validate Entire table Text(comes on mouseover) in 1 step

Post by Support Team » Tue Sep 18, 2012 11:30 am

Hi,
Shruti wrote:But, If the webpage contains a table or Div(some static content on page), Is there any way to validate the entire table text info in one go?
You can use the method GetInnerHtml to validate the including html code for every web element.

Regards,
Tobias
Ranorex Team
.
Image