Ranorex Recorder unable to click on javascript link

Ask general questions here.
ijunes
Posts: 1
Joined: Mon Sep 20, 2010 10:27 pm

Ranorex Recorder unable to click on javascript link

Post by ijunes » Mon Sep 20, 2010 10:31 pm

Code: Select all

<li class="sx4_sedan"> 
						<span class="modelmenu link " onclick="location.href='http://targetwebsite.com"></span> 
					</li> 
When I use the Ranorex recorder to record a click on the link, it recognizes the object as 'SomeSpanTag' and it won't play back the link. Does anybody have a solution for this problem?

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

Re: Ranorex Recorder unable to click on javascript link

Post by Support Team » Tue Sep 21, 2010 10:26 am

Hi,
ijunes wrote: When I use the Ranorex recorder to record a click on the link, it recognizes the object as 'SomeSpanTag' and it won't play back the link.
I think the problem is, that you don't have any text surrounded by your span tag.
So if you put some text into your span the onclick method should be executeable:

Code: Select all

<li>
	<span  onclick=location.href="http://targetwebsite.com">link</span>
</li> 
The object will then no longer be recognized as 'SomeSpanTag' but as 'SpanTagLink'.

Regards,
Tobias
Ranorex Team
.
Image