Hi telerik,
I am working on a scenario where i have to access the value using jquery. This below div [class="client-errors"] contains data which i exposed using jquery.
< div id="automation-testing">
<div class="client-errors"></div>
< div class="menus"></div></div>
At my application end i am able to fetch the requested data using -
"$("automation-testing div.client-errors").data().
But when i am trying to access it using telerik testing framework, i am not getting that data.
HtmlControl ctrl = Manager.ActiveBrowser.Find.ByExpression<HtmlControl>("id=automation-testing", "|", "class=client-errors");
Console.Writeline(ctrl.AsjQueryControl().val);
I am not getting any data using the above approach.
Please look into this nd let me know the way to capture the data using jquery.
Thanks & Regards
8 Answers, 1 is accepted

Hi telerik,
Someone please look into this.Its urgent.


Thank you for the shared details.
As of what you had listed I would recommend you directly invoke the JavaScript in code.
Actions.InvokeScript("$('automation-testing div.client-errors').data()." );
I hope this will be helpful to you!
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings

Hi Elena,
Thanks for looking into this.
I have tried the above approach. But this function is returning null.
Actions.InvokeScript(
"$('automation-testing div.client-errors').data()"
)
I am doing it wrong. Pleas elook into this.

Am i doing it wrong? Is there anything i am missing?

Sorry, i was missing the # sign
Thank you for getting back to me.
Please note that I have used the information shared by you how to invoke the script. Based on your last note I guess you found what you have missed on your own. If you need further assistance please share details what you cannot accomplish.
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings