Contributor.. Carlos I Contributor..
Contributor..
237 views

LeanFT RunJavaScript Method with C#

Hi everybody,

 

I'm writting because I have a doubt/issue I need to know how to use thise method "browser.Page.RunJavaScript()" I've been searching in google but nothing came out, I wondering if someone in the community has some ideas/samples of it use, I really appreciate any help, more background I'm using C#. Thanks.

0 Likes
3 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: LeanFT RunJavaScript Method with C#

Hi Carlos,

 

You have a sample in the LeanFT help center, have you seen it?

Its on this page:  https://admhelp.microfocus.com/leanft/en/14.51/NetSDKReference/Content/CodeSamples_.NET/CodeEx.NETWeb.htm#mt-item-13

under: Inject JavaScript into your webpage

 

Regards,

Anton

Contributor.. Carlos I Contributor..
Contributor..

Re: LeanFT RunJavaScript Method with C#

Hi thanks for reply to my post, I'v seen it but is not clear to me I need to do something like in selenium Execute("arguments[0].click()", elementToclick), any idea how to do it, with the LeanFT RunJavascript method?, I appreciate any help. Have a great week.

0 Likes
dsaaroni
Visitor.

Re: LeanFT RunJavaScript Method with C#

If you want to execute a method on an element you should try and use the NativeObject option.

In this way, the Test Object is already identified and you can execute native methods on it.

Regards,

Dror

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.