public void CodeGeneratorTest()
        {
            string fileName = @"D:\bitrun\表格数据采集\script\提取表格数据.bit";

            CodeCreator creator = new CodeCreator(new ModelSet(new FileActionRepository(fileName)));

            creator.Accept(new CasperjsCodeFormatterVisitor());
            Console.WriteLine(creator.CodeOutput);
        }
Beispiel #2
0
        public void LoadScript(string scriptFile)
        {
            //构造脚本模型
            CodeCreator creator = new CodeCreator(new ModelSet(new FileActionRepository(scriptFile)));

            creator.Accept(visitor);
            sb.Append(creator.CodeOutput);
            sb.AppendLine();
            sb.Append("casper.run();");
        }