Beispiel #1
0
        public void RegisterDeviceIPModeSSL()
        {
            try
            {
                //enabling SSL mode for device IP
                deviceSDKSettings = new GeneralInfo_SDK();

                deviceSDKSettings.EnableSSLMode();

                //searching device using ip mode with ssl
                var discoveredDevices = registerdeviceAL.SearchDevice(startIp: DriverManager.deviceToRegisterIP, ssl: true);

                //registering discovered device
                registerdeviceAL.RegisterDevice(DriverManager.deviceToRegisterIP, discoveredDevices);
                deviceListAccessLayer = new DeviceOperations_AL();

                //Verify device registration on device list page.
                Assert.IsTrue(deviceListAccessLayer.IsDeviceSuccessfullyRegistered(DriverManager.deviceToRegisterIP));

                //To Do Reset settings providing ssl mode
                //deviceSettings = new Device_SDK(new Device_SDKModel
                //{ DeviceName = "", IpAddress = DriverManager.deviceToRegisterIP, Port = deviceport }, DeviceConnectionType.EthernetSecure);
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Fail: Register device using IP failed.");
                TestResult = TestResultType.Fail;
                Assert.Fail(ex.Message);
            }
        }
        public override void Setup()
        {
            base.Setup();

            loginAccessLayer.LoginIXMWeb();
            ixmUtils.GoToTab(MainTabs.Devices);
            deviceAccessLayer = new DeviceOperations_AL();
            //dbInteraction.DeleteDeviceFromDb(deviceIp);
        }
Beispiel #3
0
        public void RegisterDeviceIPModeDifferentPort()
        {
            string changedPort = "1265";

            try
            {
                //SDK for verification
                var deviceSDKSettings = new GeneralInfo_SDK();

                deviceSDKSettings.ChangeDevicePort(changedPort);

                //Click Add Device
                deviceListAccessLayer = new DeviceOperations_AL();
                deviceListAccessLayer.AddDevice();

                //Search Device with Ip Mode with changed port
                var discoveredDevices = registerdeviceAL.SearchDevice(startIp: DriverManager.deviceToRegisterIP, port: changedPort);

                var uidetails = registerdeviceAL.RegisterDevice(DriverManager.deviceToRegisterIP, discoveredDevices);

                //Verify device registration on device list page.
                Assert.IsTrue(deviceListAccessLayer.IsDeviceSuccessfullyRegistered(uidetails.deviceInfo.SerialNumber));

                deviceSDKSettings = new GeneralInfo_SDK(DriverManager.deviceToRegisterIP, changedPort, IXMSoft.Business.SDK.Data.DeviceConnectionType.Ethernet);

                var sdkdetails = deviceSDKSettings.GetDeviceGeneralInfo();

                //Db verification
                //UI doesn't have port so verifying sdk and db for port.
                var deviceDBInfo = dbInteraction.GetDeviceDetailsFromDB(DriverManager.deviceToRegisterIP);
                Assert.AreEqual(sdkdetails.Port, deviceDBInfo.Port);

                Assert.AreEqual(sdkdetails.Name, uidetails.deviceInfo.DeviceName, "Device name invalid");
                Assert.AreEqual(sdkdetails.SerialNo, uidetails.deviceInfo.SerialNumber, "Device serial invalid");
                Assert.AreEqual(sdkdetails.FwVersion, uidetails.deviceInfo.FirmwareVersion, "Device firmware invalid");
                Assert.AreEqual(sdkdetails.Mac, uidetails.networkInfo.MacID, "Device MAC invalid");
                Assert.AreEqual(sdkdetails.IPAddress, uidetails.networkInfo.IP, "Device IP invalid");
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Fail: Register device using IP failed.");
                TestResult = TestResultType.Fail;
                Assert.Fail(ex.Message);
            }
            finally
            {
                deviceSDKSettings = new GeneralInfo_SDK(DriverManager.deviceToRegisterIP, changedPort, IXMSoft.Business.SDK.Data.DeviceConnectionType.Ethernet);
                deviceSDKSettings.ChangeDevicePort(DriverManager.deviceToRegisterPort);
                Logger.Info("Reverted PORT number back to " + DriverManager.deviceToRegisterPort + " from " + changedPort + " using SDK");
            }
        }
Beispiel #4
0
        public override void Setup()
        {
            base.Setup();

            loginAccessLayer.LoginIXMWeb();
            ixmUtils.GoToTab(MainTabs.Devices);

            //ToDo selection of device for applying settings

            deviceListAccessLayer = new DeviceOperations_AL(dbInteraction.onlineDeviceInfo);
            ixmUtils.GoToDeviceConfigurations(DeviceConfigurationTabs.Communication);

            dtmfSettingsAccessLayer = new DTMFSettings_AL();
            dtmfSDK = new CommunicationSDK();
        }
Beispiel #5
0
        public override void Setup()
        {
            base.Setup();

            loginAccessLayer.LoginIXMWeb();
            ixmUtils.GoToTab(MainTabs.Devices);

            //ToDo selection of device for applying settings

            deviceListAccessLayer = new DeviceOperations_AL();
            ixmUtils.GoToDeviceConfigurations(DeviceConfigurationTabs.Communication);

            usbportSettingsAccessLayer = new USBAuxPortSettings_AL();
            usbportSDK = new CommunicationSDK();
        }
Beispiel #6
0
        public void RegisterDeviceUI()
        {
            try
            {
                deviceListAccessLayer = new DeviceOperations_AL();
                deviceListAccessLayer.AddDevice();

                Assert.IsTrue(registerdeviceAL.IsAddDeviceDiscoveryUIValid());
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Fail: Device Register page UI failed.");
                TestResult = TestResultType.Fail;
                Assert.Fail(ex.Message);
            }
        }
Beispiel #7
0
        public void BulkDeviceRegistration()
        {
            try
            {
                deviceListAccessLayer = new DeviceOperations_AL();
                deviceListAccessLayer.AddDevice();

                registerdeviceAL.SearchDevice(autoDiscover: true);
                Thread.Sleep(2000);
                Assert.IsTrue(IXMWebUtils.IsProgressBarShown(true, CommonLocators.IXMLoader),
                              "Fail: Progress bar not displayed while doing AutoDiscovery");

                string deviceName = "IXMSHR";
                registerdeviceAL.BulkRegisterDevice(deviceName, deviceGrpName: "Simulator");
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Fail: Register device using auto discover failed.");
                TestResult = TestResultType.Fail;
                Assert.Fail(ex.Message);
            }
        }
Beispiel #8
0
        public void RegisterDeviceIPMode()
        {
            try
            {
                //Click Add Device
                deviceListAccessLayer = new DeviceOperations_AL();
                deviceListAccessLayer.AddDevice();

                //Search Device with Ip Mode
                var discoveredDevices = registerdeviceAL.SearchDevice(startIp: DriverManager.deviceToRegisterIP);

                var uidetails = registerdeviceAL.RegisterDevice(DriverManager.deviceToRegisterIP, discoveredDevices);

                //Verify device registration on device list page.
                Assert.IsTrue(deviceListAccessLayer.IsDeviceSuccessfullyRegistered(uidetails.deviceInfo.SerialNumber));

                //Db verification
                //ToDo but already from UI below SDK verification is done

                //SDK for verification
                var deviceSDKSettings = new GeneralInfo_SDK(DriverManager.deviceToRegisterIP, DriverManager.deviceToRegisterPort, IXMSoft.Business.SDK.Data.DeviceConnectionType.Ethernet);
                var sdkdetails        = deviceSDKSettings.GetDeviceGeneralInfo();

                Assert.AreEqual(sdkdetails.Name, uidetails.deviceInfo.DeviceName, "Device name invalid");
                Assert.AreEqual(sdkdetails.SerialNo, uidetails.deviceInfo.SerialNumber, "Device serial invalid");
                Assert.AreEqual(sdkdetails.FwVersion, uidetails.deviceInfo.FirmwareVersion, "Device firmware invalid");
                string mac = sdkdetails.Mac == null ? sdkdetails.WiFiMac : sdkdetails.Mac;
                Assert.AreEqual(mac, uidetails.networkInfo.MacID, "Device MAC invalid");
                Assert.AreEqual(sdkdetails.IPAddress, uidetails.networkInfo.IP, "Device IP invalid");
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Fail: Register device using IP failed.");
                TestResult = TestResultType.Fail;
                Assert.Fail(ex.Message);
            }
        }
Beispiel #9
0
        public void RegisterDeviceIPModeStartEndRange()
        {
            try
            {
                //Click Add Device
                deviceListAccessLayer = new DeviceOperations_AL();
                deviceListAccessLayer.AddDevice();

                var discoveredDevices = registerdeviceAL.SearchDevice(startIp: "192.168.138.2", endIp: "192.168.138.4");

                var allRegisteredDevices = registerdeviceAL.BulkRegisterDevice();

                //Verify device registration on device list page.
                foreach (var uidetails in allRegisteredDevices)
                {
                    Assert.IsTrue(deviceListAccessLayer.IsDeviceSuccessfullyRegistered(uidetails.deviceInfo.SerialNumber));
                    deviceSDKSettings = new GeneralInfo_SDK(uidetails.networkInfo.IP, "9734", IXMSoft.Business.SDK.Data.DeviceConnectionType.Ethernet);
                    var sdkdetails = deviceSDKSettings.GetDeviceGeneralInfo();

                    //Db verification

                    //SDK verification
                    Assert.AreEqual(sdkdetails.Name, uidetails.deviceInfo.DeviceName, "Device name invalid");
                    Assert.AreEqual(sdkdetails.SerialNo, uidetails.deviceInfo.SerialNumber, "Device serial invalid");
                    Assert.AreEqual(sdkdetails.FwVersion, uidetails.deviceInfo.FirmwareVersion, "Device firmware invalid");
                    Assert.AreEqual(sdkdetails.Mac, uidetails.networkInfo.MacID, "Device MAC invalid");
                    Assert.AreEqual(sdkdetails.IPAddress, uidetails.networkInfo.IP, "Device IP invalid");
                }
            }
            catch (Exception ex)
            {
                Logger.Error(ex, "Fail: Register device using IP for start ip end ip range failed.");
                TestResult = TestResultType.Fail;
                Assert.Fail(ex.Message);
            }
        }