Beispiel #1
0
        private void btRun_Click(object sender, EventArgs e)
        {
            //Automation at = new Automation(new ExcelFileParser());
            //SeleniumActionManager am = new SeleniumActionManager(at);
            //am.RegisterAction(new seleniumabt.ActionClick());

            //Script startScript = new Script(at.Parser.NewInstance);
            //startScript.FileName = "test.xls";

            //at.Scripts.Push(startScript);
            //at.Run();

            Automation at = new Automation(new ExcelFileParser(), new ExcelReporter(), @"D:\VAIO\dotnetabt\seleniumabt\sample");

            if (radRadioChrome.IsChecked)
            {
                SeleniumActionManager am = new SeleniumActionManager(at, SeleniumActionManager.Browser.Chrome);
            }
            else if (radRadioFireFox.IsChecked)
            {
                SeleniumActionManager am = new SeleniumActionManager(at, SeleniumActionManager.Browser.FireFox);
            }
            else if (radRadioIE.IsChecked)
            {
                SeleniumActionManager am = new SeleniumActionManager(at, SeleniumActionManager.Browser.IE);
            }

            Script startScript = new Script(at.Parser.NewInstance);
            startScript.FileName = _txtScript.Text;

            at.Scripts.Push(startScript);
            at.Start();
            this.DialogResult = System.Windows.Forms.DialogResult.No;
            this.Close();
        }
Beispiel #2
0
 /// <summary>
 /// construct an ActionManager
 /// </summary>
 /// <param name="parent">the Automation object</param>
 public ActionManager(Automation parent)
 {
     Parent = parent;
     parent.ActionManagers.Add(this);
     Actions = new Dictionary <string, Action>();
 }
Beispiel #3
0
 /// <summary>
 /// construct an ActionManager
 /// </summary>
 /// <param name="parent">the Automation object</param>
 public ActionManager(Automation parent)
 {
     Parent = parent;
     parent.ActionManagers.Add(this);
     Actions = new Dictionary<string, Action>();
 }