WhiteHatBox
Share Page
Following(0)
Partner(s)
kudave2

Can't get RunCSharpCode to work in BotChief Editor

ReplyThanks 2017/01/06 10:21:58 0 0
Used forum example http://www.whitehatbox.com/bbs/BBSPost?postid=4349&searchText=date#.WG8T24WcFhE to get date/time from system and on TestRun got error stating that I was using a different version of browser and it couldn't run. If I run in debug it doesn't return date/time to the variable that I assigned. Looking for the best way to obtain system date and time for a wait or sleep process. Thanks!
seo
2017/01/06 20:37:51

Hey There,

I'm just a random dude who bought the software and has been playing with it a bit today.

I just made a simple project with a module, a variable called "date", an action with the c# code from the other thread, a "show variable" action and passed the result into the variable and the date and time showed fine. Make sure you filled out each of the fields and included the code exactly as provided. I'm putting the code here to make copying and pasting easy:


using System;
namespace TestNameSpace
{
public class TestClass
{
public static string TestMethod()
{
return DateTime.Now.ToString();
}
}
}

Don't forget to fill in the namespace, class and method name fields, and save the result to the variable you want it stored in. I hope this helps :-)

<< < 1> >>
VerifyCode
Advanced Option