Пример #1
0
        public AndroidADBDriverEditPage(GingerCore.Agent mAgent)
        {
            InitializeComponent();

            this.mAgent = mAgent;


            if (mAgent.DriverConfiguration == null)
            {
                mAgent.DriverConfiguration = new ObservableList <DriverConfigParam>();
            }

            DriverConfigParam ModelDCP = mAgent.GetOrCreateParam("Model", "");

            App.ObjFieldBinding(DeviceModelTextBox, TextBox.TextProperty, ModelDCP, "Value");

            DriverConfigParam SerialDCP = mAgent.GetOrCreateParam("Serial", "");

            App.ObjFieldBinding(DeviceSerialTextBox, TextBox.TextProperty, SerialDCP, "Value");

            DriverConfigParam LaunchEmulatorCommand = mAgent.GetOrCreateParam("LaunchEmulatorCommand", "");

            App.ObjFieldBinding(LaunchEmulatorCommandTextBox, TextBox.TextProperty, LaunchEmulatorCommand, "Value");

            DriverConfigParam DeviceConfigFolder = mAgent.GetOrCreateParam("DeviceConfigFolder", "");

            App.ObjFieldBinding(DeviceConfigFolderTextBox, TextBox.TextProperty, DeviceConfigFolder, "Value");

            UpdateDeviceViewPage();
        }
Пример #2
0
        public SeleniumRemoteWebDriverEditPage(GingerCore.Agent mAgent)
        {
            InitializeComponent();

            if (mAgent.DriverConfiguration == null)
            {
                mAgent.DriverConfiguration = new ObservableList <DriverConfigParam>();
            }

            DriverConfigParam GridHostDCP = mAgent.GetOrCreateParam(SeleniumDriver.RemoteGridHubParam, "http://127.0.0.1:4444");

            App.ObjFieldBinding(GridHostTextBox, TextBox.TextProperty, GridHostDCP, "Value");

            DriverConfigParam BrowserNameDCP = mAgent.GetOrCreateParam(SeleniumDriver.RemoteBrowserNameParam, "firefox");

            App.ObjFieldBinding(BrowserNameComboBox, ComboBox.SelectedValueProperty, BrowserNameDCP, "Value");

            DriverConfigParam PlatformDCP = mAgent.GetOrCreateParam(SeleniumDriver.RemotePlatformParam);

            App.ObjFieldBinding(PlatformComboBox, ComboBox.SelectedValueProperty, PlatformDCP, "Value");

            DriverConfigParam VersionDCP = mAgent.GetOrCreateParam(SeleniumDriver.RemoteVersionParam);

            App.ObjFieldBinding(VersionTextBox, TextBox.TextProperty, VersionDCP, "Value");
        }
Пример #3
0
        private void SelectDeviceButton_Click(object sender, RoutedEventArgs e)
        {
            AndroidDeviceSelectPage p = new AndroidDeviceSelectPage(mAgent);

            p.ShowAsWindow();

            //???
            //TODO: fix me , from some reason the bind above didn't work so after the window is closed we bind again.. temp solution
            DriverConfigParam ModelDCP = mAgent.GetOrCreateParam("Model", "");

            App.ObjFieldBinding(DeviceModelTextBox, TextBox.TextProperty, ModelDCP, "Value");

            DriverConfigParam SerialDCP = mAgent.GetOrCreateParam("Serial", "");

            App.ObjFieldBinding(DeviceSerialTextBox, TextBox.TextProperty, SerialDCP, "Value");
        }