public void TestIniti() { this.TestInitialize(); this.applicationMainPage = new ApplicationMainPage(this.Driver); this.loginPage = new LoginPage(this.Driver); this.loanParamPage = new LoanParametersPage(this.Driver); this.personalDataPage = new PersonalDataPage(this.Driver); this.addressPage = new AddressPage(this.Driver); this.contactsPage = new ContactsPage(this.Driver); this.additionalInfoPage = new AdditionalInfoPage(this.Driver); this.creditsPage = new OtherCreditsPage(this.Driver); this.incomePage = new IncomePage(this.Driver); this.otherIncomePage = new OtherIncomePage(this.Driver); this.homePage = new HomePage(this.Driver); this.loanPaymentPage = new LoanPaymentPage(this.Driver); this.printingDocumentsPage = new PrintingDocumentsPage(this.Driver); this.uploadDocumentsPage = new UploadDocumentsPage(this.Driver); this.clientOpinionPage = new ClientOpinionPage(this.Driver); this.fraudSuspicionsPage = new FraudSuspicionPage(this.Driver); var user = AccessExcelData.GetTestData <User>("TestName", "TestUser", "Users", BaseConstants.UsersXlsxFilename); this.loginPage.AnotherUserLogin(user, BaseConstants.TestCRMUrl); Thread.Sleep(1500); this.homePage.Applications.Click(); this.applicationMainPage.OpenNewApplication(); }
public void SetupTest() { application = Setup.attachPSC(); currentWindow = Setup.getWindow(application); standard = new StandardOperations(currentWindow); search = new SearchPage(currentWindow); tabs = new Tabs(currentWindow); bip = new BasicInfoPage(currentWindow); aip = new AdditionalInfoPage(currentWindow); //Searching for the patient search.SearchPatient(searchpatient); search.SelectFirstSearchRecord(); }
//private readonly ScenarioContext _scenarioContext; public TestMainFunctionsSteps(ScenarioContext scenarioContext) { //_scenarioContext = scenarioContext; testAppPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resources", "BoxingTimer.apk"); desiredCaps.AddAdditionalCapability(MobileCapabilityType.DeviceName, "Android_Accelerated_x86_Oreo"); desiredCaps.AddAdditionalCapability(AndroidMobileCapabilityType.AppPackage, "com.nulltree.roundbell"); desiredCaps.AddAdditionalCapability(MobileCapabilityType.PlatformName, "Android"); desiredCaps.AddAdditionalCapability(MobileCapabilityType.PlatformVersion, "9"); desiredCaps.AddAdditionalCapability(MobileCapabilityType.App, testAppPath); _driver = new AndroidDriver <AndroidElement>(new Uri("http://127.0.0.1:4723/wd/hub"), desiredCaps); mainPage = new MainPage(_driver); settingsPage = new SettingsPage(_driver); favoritePage = new FavoritePage(_driver); additionalInfoPage = new AdditionalInfoPage(_driver); }
public MainWindow() { InitializeComponent(); //only attach SelectionChanged event here to avoid the culture being updated twice ComboBox_Languages.SelectedItem = Properties.Settings.Default.DefaultCulture.NativeName; this.ComboBox_Languages.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.ComboBox_Languages_SelectionChanged); FormPopup.RegisterMainWindow(this);//Register main window as the master window, used for displaying popups followupSection = new FollowUpSectionForm(); shiftSection = new ShiftsSection(); mapModificationSection = new AdditionalInfoPage(this); teamsSection = new TeamsSectionPage(this); mapSection = new MapSectionPage(this, mapModificationSection); interventionsSection = new InterventionSectionPage(this); previousWidth = MapSection.ActualWidth; previousHeight = MapSection.ActualHeight; //Populating the Map modification section Frame AIFrame = new Frame(); AIFrame.Content = mapModificationSection; AIPSection.Child = AIFrame; //Populating the Teams section Frame teamsFrame = new Frame(); teamsFrame.Content = teamsSection; TeamsSection.Child = teamsFrame; //Populating the Map section Frame mapFrame = new Frame(); mapFrame.Content = mapSection; MapSection.Child = mapFrame; //Populating the Interventions section Frame interventionsFrame = new Frame(); interventionsFrame.Content = interventionsSection; InterventionsSection.Child = interventionsFrame; //Starting GPS Services tasks GPSServices.StartServices(this); }
//Creating map modification pins public Pin(object relatedAiObject, AdditionalInfoPage aiSection, double width, double height) { //Setting relatedObject, used for position recovery relatedObject = relatedAiObject; //Initializing grid attibutes this.Width = width; this.Height = height; //Initializing grid attibutes this.MouseLeftButtonDown += new MouseButtonEventHandler(aiSection.DrawingStart); this.MouseLeftButtonUp += new MouseButtonEventHandler(aiSection.DrawingStop); this.MouseUp += new MouseButtonEventHandler(aiSection.DrawingMove); this.MouseMove += new MouseEventHandler(aiSection.Move); this.MouseWheel += new MouseWheelEventHandler(aiSection.ChangeColor); //Adding the pin to the list of all pins pinList.Add(this); }
//The map is saved when the window is closed public static void saveMap(AdditionalInfoPage AIPmapSection) { Rect AIbounds = VisualTreeHelper.GetDescendantBounds(AIPmapSection); var AIFileName = "MapModification_" + DateTime.Now.ToString("yyyyMMdd_hhss"); var desktopFolder = Environment.GetFolderPath(Environment.SpecialFolder.Desktop); double dpi = 96d; bool isMapLoaded = AIPmapSection.MapLoaded(); //If a map was loaded and modifications were made, save the map if (AIbounds.ToString() != "Empty" && isMapLoaded) { //Check the bound of the map RenderTargetBitmap rtb = new RenderTargetBitmap((int)AIbounds.Width, (int)AIbounds.Height, dpi, dpi, System.Windows.Media.PixelFormats.Default); DrawingVisual dv = new DrawingVisual(); using (DrawingContext dc = dv.RenderOpen()) { VisualBrush vb = new VisualBrush(AIPmapSection.AdditionalMap); dc.DrawRectangle(vb, null, new Rect(new System.Windows.Point(), AIbounds.Size)); } rtb.Render(dv); BitmapEncoder pngEncoder = new PngBitmapEncoder(); pngEncoder.Frames.Add(BitmapFrame.Create(rtb)); try { System.IO.MemoryStream ms = new System.IO.MemoryStream(); pngEncoder.Save(ms); ms.Close(); System.IO.File.WriteAllBytes(desktopFolder + "\\" + AIFileName + ".png", ms.ToArray());//Save the modified map as an image based on bounds of the map } catch (Exception err) { MessageBox.Show(err.ToString(), "Error", MessageBoxButton.OK, MessageBoxImage.Error); } } }
public MapModPin(MapMod mapMod, AdditionalInfoPage aiSection, double width, double height) : base(mapMod, aiSection, aiSection.ActualWidth, aiSection.ActualHeight) { base.setImage(TechnicalServices.getImage(mapMod.getMapModType())); //Setting the image of the map modification pin mapModification = mapMod; //Providing a link to the map that this pin represents }