Exemple #1
0
        public void SwitchWindowAction()
        {
            ActBrowserElement actBrowser = new ActBrowserElement();

            actBrowser.ControlAction = ActBrowserElement.eControlAction.GotoURL;
            actBrowser.AddOrUpdateInputParamValue(ActBrowserElement.Fields.URLSrc, ActBrowserElement.eURLSrc.Static.ToString());
            actBrowser.GetOrCreateInputParam("Value", "https://www.google.co.in/?gws_rd=ssl");
            actBrowser.AddOrUpdateInputParamValue(ActBrowserElement.Fields.GotoURLType, ActBrowserElement.eGotoURLType.Current.ToString());

            ActSwitchWindow actSwitchWindow = new ActSwitchWindow();

            actSwitchWindow.LocateBy    = Amdocs.Ginger.Common.UIElement.eLocateBy.ByTitle;
            actSwitchWindow.LocateValue = "Google";
            actSwitchWindow.GetOrCreateInputParam(ActSwitchWindow.Fields.WaitTime, "10");

            ActBrowserElement actBrowser1 = new ActBrowserElement();

            actBrowser1.ControlAction      = ActBrowserElement.eControlAction.GetWindowTitle;
            actBrowser1.AddNewReturnParams = true;

            //Act
            mGR.RunAction(actBrowser, false);
            mGR.RunAction(actSwitchWindow, false);
            mGR.RunAction(actBrowser1, false);

            //Assert
            Assert.AreEqual(eRunStatus.Passed, actSwitchWindow.Status, "Action Status");
            Assert.AreEqual("Google", actBrowser1.ReturnValues[0].Actual);
        }
Exemple #2
0
        public ActSwitchWindowEditPage(ActSwitchWindow act)
        {
            InitializeComponent();

            mAct = act;

            WaitTimeTextBox.Init(Context.GetAsContext(mAct.Context), mAct.GetOrCreateInputParam(ActSwitchWindow.Fields.WaitTime));
        }