Esempio n. 1
0
        public void ShouldBeInABOrderByDefault()
        {
            new HomePage(Driver).ClickDragAndDropLink();
            var dnd = new DragAndDropPage(Driver);

            dnd.Elements().Should().ContainInOrder("A", "B");
        }
Esempio n. 2
0
        public void ShouldBeInBAOrderAfterDragAndDrop()
        {
            new HomePage(Driver).ClickDragAndDropLink();
            var dnd = new DragAndDropPage(Driver);

            dnd.DragFromColAToColB();
            dnd.Elements().Should().ContainInOrder("B", "A");
        }
        public void Exercise_10_Test()
        {
            // TODO: Add your test code here
            var internetPage = new InternetPage(this.DriverContext);

            internetPage.OpenHomePage();
            internetPage.GoToPage("drag_and_drop");
            var dragAndDropPageHeader = new DragAndDropPage(this.DriverContext);

            Assert.AreEqual("Drag and Drop", dragAndDropPageHeader.GetHeader());
            var moveElementAtoElementB = new DragAndDropPage(this.DriverContext);

            moveElementAtoElementB.MoveElementAtoElementB();
            var draganddropPage = new DragAndDropPage(this.DriverContext);

            Assert.AreEqual("A", draganddropPage.GetText());
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="DragAndDropSteps"/> class.
 /// </summary>
 /// <param name="contextManager">The context manager.</param>
 public DragAndDropSteps(IContextManager contextManager)
 {
     this.dragAndDropPage = contextManager?.TestThreadContext.Get <IObjectContainer>("objectContainer")?.Resolve <DragAndDropPage>();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="DragAndDropSteps"/> class.
 /// </summary>
 /// <param name="objectContainer">The object container.</param>
 public DragAndDropSteps(IObjectContainer objectContainer)
 {
     this.dragAndDropPage = objectContainer.Resolve <DragAndDropPage>();
 }