Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

firing OnClick event for IE

$
0
0

I was originally working with chrome, but I changed over to IE b/c I needed the Image validation Tools(they're not in chrome).

I had already made most of my tests and they were working just fine BUT when I started running them in IE I found my tests that try to fire an anchor onClick didn't work and I tried again in chrome to make sure and they still work there. This is my method I made...

public void Room_Booking_CodedStep1()
{   
    String title = "title="+DateTime.Now.AddDays(1).ToString("MMMM") + " " + date.Day; // to alwasy be one day ahead EX "October 29"
    Element ele = Find.ByAttributes(title);
    var anchor = new HtmlAnchor(ele);
    anchor.InvokeEvent(ScriptEventType.OnClick);          
}

 the mark up i'm trying to call and i checked that they are the same in both browsers

<a title="October 29" style="color: black;" href="javascript:__doPostBack('ctl00$ctl00$cphBaseMasterBody$cphAuthenticatedRightColumn$QuickBook1$calView','5780')">29</a>


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>