public void ItemsFromEachCategory_DragAndDropToTargetArea_TargetAreaContainsTheItems() { var droppablePage = new DroppablePage(this.driver); InteractionPages drop = AccessExcelData.GetInteractionTestsData(TestContext.CurrentContext.Test.Name); // Get the current test method name (TestContext.CurrentContext.Test.Name = DefaultFunctionality_DragToOppositeCorner_ElementMovedToOppositeCorner) and use it as a Key in the xlsx file // Get the tab number (e.g. "Default functionality", "Prevent propagation") from the test property above and give it to the URL droppablePage.tabNo = TestContext.CurrentContext.Test.Properties.Get("Droppable test tab Number:").ToString(); droppablePage.NavigateTo(droppablePage.URL); // Scroll page Up so the element is into view. Because when Firefox opens the desired page/tab, somehow the page is scrolled down ((IJavaScriptExecutor)driver).ExecuteScript("arguments[0].scrollIntoView(true);", droppablePage.TopOfPage); // Find by one element from each Category accoeding to Data Driven xlsx // Open the respective category, Drag the elements to cart (to Target) droppablePage.OpenCategory(1); Thread.Sleep(1000); droppablePage.DragAndDrop3(drop.Item1, droppablePage.TargetElementTab5); droppablePage.OpenCategory(2); Thread.Sleep(1000); droppablePage.DragAndDrop3(drop.Item2, droppablePage.TargetElementTab5); droppablePage.OpenCategory(3); Thread.Sleep(1000); droppablePage.DragAndDrop3(drop.Item3, droppablePage.TargetElementTab5); Thread.Sleep(1000); droppablePage.AssertTargetContains(drop.Item1); droppablePage.AssertTargetContains(drop.Item2); droppablePage.AssertTargetContains(drop.Item3); }
public void DragSliderOutOf_Droppable_Element_Should_Not_Change_BGColor_And_TextColor() { //Arrange var droppablePage = new DroppablePage(_driver); droppablePage.DroppableLink.Click(); DelayForVideo(); _action.MoveToElement(droppablePage.Draggable).Perform(); DelayForVideo(); var expectedBGColor = droppablePage.DroppableBackgroundColor; var expectedTextColor = droppablePage.DroppableTextColor; //Act droppablePage.DragAndDropHandle(droppablePage.Draggable, 40, 200); DelayForVideo(); var actualBGColor = droppablePage.DroppableBackgroundColor; var actualTextColor = droppablePage.DroppableTextColor; //Assert actualBGColor.Should().BeEquivalentTo(expectedBGColor); actualTextColor.Should().BeEquivalentTo(expectedTextColor); }
public void SetUp() { Initalize(); _droppablePage = new DroppablePage(Driver); _droppablePage.NavigateTo(); Wait = new WebDriverWait(Driver, TimeSpan.FromSeconds(5)); }
public void SetUp() { _driver = new ChromeDriver(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)); _driver.Manage().Window.Maximize(); _droppablePage = new DroppablePage(_driver); _sideBarPage = new SideBarPage(_driver); }
public void DroppableTarget() { var droppablePage = new DroppablePage(this.driver); droppablePage.DragAndDrop(); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(71, -49); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(71, 0); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(80, 50); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(219, -49); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(180, 20); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(219, 0); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(219, 99); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); droppablePage.DragAndDrop(71, 99); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); }
public void DragSliderInto_Droppable_Element_Should_Change_BGColor_And_TextColor() { //Arrange string expectedBGColor = "rgba(255, 250, 144, 1)"; string expectedTextColor = "rgba(119, 118, 32, 1)"; var droppablePage = new DroppablePage(_driver); droppablePage.DroppableLink.Click(); DelayForVideo(); _action.MoveToElement(droppablePage.Draggable).Perform(); DelayForVideo(); //Act droppablePage.DragAndDropHandle(droppablePage.Draggable, 140, 30); DelayForVideo(); var actualBGColor = droppablePage.DroppableBackgroundColor; var actualTextColor = droppablePage.DroppableTextColor; //Assert actualBGColor.Should().BeEquivalentTo(expectedBGColor); actualTextColor.Should().BeEquivalentTo(expectedTextColor); }
public void DroppableAcceptTarget() { var droppablePage = new DroppablePage(this.driver); droppablePage.AcceptValidDragAndDrop(); droppablePage.AssertAcceptTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); }
public void SetUp() { Initialize(); Driver.Manage().Window.Maximize(); _homePage = new HomePage(Driver); _droppablePage = new DroppablePage(Driver); _homePage.NavigateTo(); }
public void Initialize() { InitBrowser(BrowserType.Firefox); driver.Navigate().GoToUrl(DroppablePage.BaseUrl); Methods.Methods.ImplicitWaitForSeconds(driver, 2); DroppablePage = new DroppablePage(driver); }
public DroppableSteps(IObjectContainer container) { this.container = container; driver = container.Resolve <IWebDriver>(); config = container.Resolve <IConfiguration>(); action = container.Resolve <Actions>(); DroppablePage = new DroppablePage(driver); }
public void SetUp() { Initialize(); Driver.Manage().Window.Maximize(); Driver.Navigate().GoToUrl("http://demoqa.com/"); _droppablePage = new DroppablePage(Driver); }
public void Setup() { Initialize(); _droppblePage = new DroppablePage(Driver); _droppblePage.NavigationToPage("Droppable"); _droppblePage.PageLoad(); }
public void DropNotAcceptableIcon_AcceptTab() { using (IWebDriver driver = new ChromeDriver()) { var droppablePage = new DroppablePage(driver); droppablePage.LoadPage(); droppablePage.DropNotAcceptableIcon_AcceptTab(); } }
public void DroppableFirstTry() { this.driver = new ChromeDriver(); var droppablePage = new DroppablePage(this.driver); droppablePage.DragAndDrop(); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); }
public void NonDroppableAccept() { this.driver = new ChromeDriver(); var droppablePage = new DroppablePage(this.driver); droppablePage.DragAndDropNotAccept(); droppablePage.AssertTargetToDropAttributeValue("ui-widget-header ui-droppable"); }
public void DropNotGreedyIcon_PropogationTab() { using (IWebDriver driver = new ChromeDriver()) { var droppablePage = new DroppablePage(driver); droppablePage.LoadPage(); droppablePage.DropNotGreedyIcon_PropogationTab(); } }
public void DropRevertIcon_RevertTab() { using (IWebDriver driver = new ChromeDriver()) { var droppablePage = new DroppablePage(driver); droppablePage.LoadPage(); droppablePage.DropRevertIcon_RevertTab(); } }
public void InnerDropableGreedy() { this.driver = new ChromeDriver(); var droppablePage = new DroppablePage(this.driver); droppablePage.DragAndDropPropagationGreedy(); droppablePage.AssertTargetToDropGreedyAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); }
public void DroppableSecondTest() { var droppablePage = new DroppablePage(driver); droppablePage.NavigateTo(); droppablePage.DragAndDrop(); droppablePage.AssertTargetAttributeValueId("droppableview"); }
public void DroppableSixthTest() { var droppablePage = new DroppablePage(driver); droppablePage.NavigateToSecondTab(); droppablePage.DragAndDropSecondTab(); droppablePage.AssertTextSecondTarget("you can find a screenshot of the this failed test!"); }
public void DroppableFirstTest() { var droppablePage = new DroppablePage(driver); droppablePage.NavigateTo(); droppablePage.DragAndDrop(); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable ui-state-highlight"); }
public void DroppableFourthTest() { var droppablePage = new DroppablePage(driver); droppablePage.NavigateToSecondTab(); droppablePage.DragAndDrop(); droppablePage.AssertTargetAttributeValue("ui-widget-header ui-droppable"); }
public void DroppableThirdTest() { var droppablePage = new DroppablePage(driver); droppablePage.NavigateTo(); droppablePage.DragAndDrop(); droppablePage.AssertTargetText("Dropped!"); }
public void DefaultElementDropTest() { //drops element to his box var droppablePage = new DroppablePage(driver); droppablePage.NavigateTo(); droppablePage.DefaultDropElement(); droppablePage.SuccessDroped.Text.Contains("Dropped!").Should().BeTrue(); }
public void DroppableNotAcceptTarget() { var droppablePage = new DroppablePage(this.driver); droppablePage.AcceptNotValidDragAndDrop(); droppablePage.AssertNotAcceptTargetAttributeValue("ui-widget-header ui-droppable"); droppablePage.AcceptNotValidDragAndDrop(280, 40); droppablePage.AssertNotAcceptTargetAttributeValue("ui-widget-header ui-droppable"); }
public void NavigateToDroppablePage_SideMenu() { using (IWebDriver driver = new ChromeDriver()) { var interactionsMainPage = new Interactions_MainPage(driver); interactionsMainPage.LoadPage(); DroppablePage droppablePage = interactionsMainPage.NavigateToDroppablePage_SideMenu(); droppablePage.EnsurePageLoaded(); } }
public void DroppableElement_DragAndDropToTarget_TargetAttributeChangedToDropped() { var droppablePage = new DroppablePage(this.driver); droppablePage.NavigateTo(droppablePage.URL); droppablePage.DragAndDrop(); droppablePage.AssertTargetAttribute("ui-widget-header ui-droppable ui-state-highlight"); }
public void ShoppingCartDragAndDropTest() { //moves Cheezeburger Shirt to shopping cart var droppablePage = new DroppablePage(driver); droppablePage.NavigateTo(); droppablePage.ShoppingCartDragAndDrop(); droppablePage.ShoppingCart.Text.Contains("Cheezeburger Shirt").Should().BeTrue(); }
public void DropElementInSquare() { var page = new DroppablePage(driver); page.NavigateToDroppable(); builder.DragAndDrop(page.DraggableElement, page.DropElement).Perform(); Assert.IsTrue(page.DropElement.Displayed); }
public void Setup() { Initialize(); _droppablePage = new DroppablePage(Driver); // Driver.Url = "http://www.demoqa.com/droppable"; _droppablePage.NavigateTo(); }