Execute JavaScript from within a C# assembly

后端 未结 6 2148
既然无缘
既然无缘 2021-02-05 07:08

I\'d like to execute JavaScript code from within a C# assembly and have the results of the JavaScript code returned to the calling C# code.

It\'s easier to define things

6条回答
  •  长发绾君心
    2021-02-05 07:59

    Could it be simpler to use JSUnit to write your tests, and then use a WatiN test wrapper to run them through C#, passing or failing based on the JSUnit results?

    It is indeed an extra step though.

    I believe I read somewhere that an upcoming version of either MBUnit or WatiN will have the functionality built in to process JSUnit test fixtures. If only I could remember where I read that...

提交回复
热议问题