public void Initialize() { ChromeOptions options = new ChromeOptions(); options.AddUserProfilePreference("download.default_directory", "D:\\"); driver = new ChromeDriver(options); DownloadPage = new DownloadPage(driver); driver.Navigate().GoToUrl(DownloadPage.BaseUrl); }
public PageManage() { this.downloadPage = new DownloadPage(); this.findMusicPage = new FindMusicPage(); this.fMPage = new FMPage(); this.friendPage = new FriendPage(); this.localMusicPage = new LocalMusicPage(); this.lOOKPage = new LOOKPage(); this.mainPage = new MainPage(); this.videoPage = new VideoPage(); }
public static void addElementToSeriesTable(DownloadPage downloadPage, SeriesQueryOut response) { dynamic myItem = new System.Dynamic.ExpandoObject(); IDictionary <string, object> myItemValues; PropertyInfo[] property = typeof(SeriesQueryOut).GetProperties(); for (int j = 0; j < property.Length; j++) { myItemValues = (IDictionary <string, object>)myItem; myItemValues[property[j].Name] = property[j].GetValue(response); } downloadPage.dataGrid.Items.Add(myItem); }
public void SaveWebDriverScreenShotTest() { InternetPage internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToFileDownloader(); var screenShotNumber = FilesHelper.CountFiles(this.DriverContext.ScreenShotFolder, FileType.Png); DownloadPage downloadPage = new DownloadPage(this.DriverContext); downloadPage.SaveWebDriverScreenShot(); var nameOfScreenShot = downloadPage.CheckIfScreenShotIsSaved(screenShotNumber); Assert.IsTrue(nameOfScreenShot.Contains(this.DriverContext.TestTitle), "Name of screenshot doesn't contain Test Title"); }
public MainWindow() { InitializeComponent(); // Contains all images Repo = new MemeRepository(); // Initialize main pages EditorPage = new EditorPage(Repo); DownloadPage = new DownloadPage(Repo); AllMemesPage = new AllMemesPage(Repo, MainFrame, EditorPage); // Start page CurrentPage = AllMemesPage; MainFrame.Navigate(CurrentPage); }
public void SteamAppDownloadTest_FileDownloaded() { Logger.GetInstance().LogLine($"STEP: Opening main page..."); MainPage mainPage = new MainPage(); mainPage.DownloadButton.Click(); Logger.GetInstance().LogLine($"STEP: Clicked download button on main page."); DownloadPage downloadPage = new DownloadPage(); downloadPage.DownloadButton.Click(); Logger.GetInstance().LogLine($"STEP: Clicked download button on download page."); string path = Path.GetDirectoryName(Environment.GetFolderPath(Environment.SpecialFolder.Personal)); path = Path.Combine(path, "Downloads"); bool isFileDownloaded = FileUtils.IsFileDownloaded(path, "SteamSetup*.exe"); Assert.IsTrue(isFileDownloaded, $"File not found in {path}."); Logger.GetInstance().LogLine($"STEP: Test complete."); }
public void SteamAutoTest() { MainPage mainPage = new MainPage(); mainPage.ChooseCategoryFromMenu(); ActionsPage actionsPage = new ActionsPage(); actionsPage.SelectDiscountsTab(); DiscountsPage discountsPage = new DiscountsPage(); discountsPage.NavigateToMaxDiscount(); Game expectedGame = discountsPage.GetGameFromDiscounts(); AgePage2 agePage2 = new AgePage2(); agePage2.SubmitView(); AgePage agePage = new AgePage(); agePage.FillAgeData(Configuration.GetYear()); GamePage gamePage = new GamePage(); Game actualGame = gamePage.GetGame(); Assert.AreEqual(expectedGame.Name, actualGame.Name, "Names are equal. The right game opened."); Assert.AreEqual(expectedGame.Discount, actualGame.Discount, "Discounts are equal."); Assert.AreEqual(expectedGame.Price, actualGame.Price, "Prices are equal."); gamePage.NavigateToDownloadPage(); DownloadPage downloadPage = new DownloadPage(); downloadPage.StartDownloadSteam(); Assert.IsTrue(downloadPage.CheckFinishDownload(filePath), "SteamSetup.exe downloaded successfully"); }
public static void setupSeriesTable(DownloadPage downloadPage) { // setup table according to required properties PropertyInfo[] properties = typeof(SeriesQueryOut).GetProperties(); foreach (PropertyInfo property in properties) { // aggiungo la colonna // e riduco a 0 la visibilità delle colonne nascoste string contents = File.ReadAllText("SeriesColumnsToShow.txt"); if (contents.Contains(property.Name)) { downloadPage.dataGrid.Columns.Add(new DataGridTextColumn { Header = property.Name, Binding = new Binding(property.Name) }); } } downloadPage.dataGrid.Columns.Add(new DataGridTemplateColumn { Header = "Image", CellTemplate = downloadPage.FindResource("iconTemplate") as DataTemplate }); }
public void DownloadTestUsingSendKey() { HomePage.ManuSelecter("File Download"); DownloadPage.DownloadFile(); }
private anon_e77da3131e1d4cf1970c18c99c04c921 Copy_3518e41cd8c542228a7c331cd51d1cda(DownloadPage o) { anon_e77da3131e1d4cf1970c18c99c04c921 t = new anon_e77da3131e1d4cf1970c18c99c04c921(); t.DownloadPage = o; return t; }
public static void addImage(DownloadPage downloadPage, int seriesNumber, BitmapImage image) { var dyn = downloadPage.dataGrid.Items[seriesNumber] as dynamic; dyn.Image = image; }
private anon_e77da3131e1d4cf1970c18c99c04c921 Copy_3518e41cd8c542228a7c331cd51d1cda(DownloadPage o) { anon_e77da3131e1d4cf1970c18c99c04c921 t = new anon_e77da3131e1d4cf1970c18c99c04c921(); t.DownloadPage = o; return(t); }
private anon_0bff662ab81749ce9629d644bb3a956d Copy_4a32ec48c7394a7d80b9af418f2ff267(DownloadPage o) { anon_0bff662ab81749ce9629d644bb3a956d t = new anon_0bff662ab81749ce9629d644bb3a956d(); t.DownloadPage = o; return(t); }
private anon_689d51d359b141258928b1f3b4014cf2 Copy_80bd4526f74c45d6b775bcab35272e7b(DownloadPage o) { anon_689d51d359b141258928b1f3b4014cf2 t = new anon_689d51d359b141258928b1f3b4014cf2(); t.DownloadPage = o; return(t); }