public void AddYoutubeVideo(string link, int par) { Base.MongoDb.UpdateSteps($"Click on Youtube icon."); _browserHelper.WaitForElement(youtubeIcon, nameof(youtubeIcon)); youtubeIcon.Click(); Base.MongoDb.UpdateSteps($"Put Youtube link: {link}."); _browserHelper.WaitForElement(youtubeLinkTxtBox, nameof(youtubeLinkTxtBox)); youtubeLinkTxtBox.SendKeys(link); Base.MongoDb.UpdateSteps($"Click on search button."); _browserHelper.WaitForElement(youtubeSearchBtn, nameof(youtubeSearchBtn)); youtubeSearchBtn.Click(); _browserHelper.WaitForElement(youtubeSearchResult, nameof(youtubeSearchResult)); Base.MongoDb.UpdateSteps($"Drag Youtube video."); _browserHelper.DragElement(youtubeSearchResult, dropMedia[par]); Base.MongoDb.UpdateSteps($"Click on save button."); _browserHelper.WaitForElement(youtubeVideoSaveBtn, nameof(youtubeVideoSaveBtn)); _browserHelper.Click(youtubeVideoSaveBtn, nameof(youtubeVideoSaveBtn)); _browserHelper.WaitForElementDiss(youtubeVideoSaveBtn); }
public EditorPage ClickOnAddArticle() { _browserHelper.WaitForElement(writeAnArticleBtn, "Write an article Button"); Base.MongoDb.UpdateSteps($"Click on Write New Article Button."); _browserHelper.Click(writeAnArticleBtn, nameof(writeAnArticleBtn)); return(new EditorPage(_browser)); }
public ArticleBase ClickOnArticle() { Base.MongoDb.UpdateSteps($"Click on Article template."); _browserHelper.WaitForElement(article, nameof(article)); _browserHelper.Click(article, nameof(article)); return(new ArticleBase(_browser)); }
public EditorPage ClickonWriteAnArticleBtn() { _browser.SwitchToFirstTab(); Thread.Sleep(1000); Base.MongoDb.UpdateSteps($"Click on Write an article Button."); if (_browserHelper.WaitForElement(WriteAnArticleBtn, nameof(WriteAnArticleBtn), 10, false)) { _browserHelper.Click(WriteAnArticleBtn, "Write new article button.", 0, false); } return(new EditorPage(_browser)); }