Exemplo n.º 1
0
 /// <summary>
 /// This Method Performs Drag and Drop an element from scrolllist to Workfield by Sikuli4net
 /// </summary>
 /// <param name="scrollElement">Scroll Element class</param>
 public void DragAndDrop(ScrollElement scrollElement)
 {
     Pattern pattern_Drag = new Pattern(Configuration.PathToImgs()+scrollElement.GetImageDragPatern());
     Pattern pattern_Drop = new Pattern(Configuration.PathToImgs() + "wrk.png",0.5f);
     Screen scrn = new Screen();
     scrn.DragDrop(pattern_Drag,pattern_Drop);
 }
        public void RunTest()
        {
            Log.Step(1,"Closing Welcome PopUp form");
            var welcomepopup = new WelcomPopUp();
            welcomepopup.Close();

            Log.Step(2,"Go To Furnish->Dinning room");
            var mainform = new MainForm();
            mainform.SidebarMenu.OpenItem(SidebarMenu.SidebarItems.Furnish); //Choose an object from Sidebar menu
            mainform.FurnishMenu.OpenItem(FurnishMenu.FurnishItems.Dinningroom); //Choose an object from Furnish->Browse Menu
            var scrollElement = new ScrollElement(ScrollElement.ScrollerItems.TeaTable);//Chose an Object from Scroller to work with

            Log.Step(3,"Drag and Drop selected Item and verify it's present");
            mainform.DragAndDrop(scrollElement);
            mainform.DroppedImageIsPresent(scrollElement);

            Log.Step(4,"Verify that Item on Workfield is the same as Chosen Item");
            mainform.VerifyElementInfo();

            Log.Step(5,"Delete Image from Workfield and verify it's empty");
            mainform.DeleteFirstImageFromWorkField();
            mainform.VerifySceneIsEmpty();
        }
Exemplo n.º 3
0
 /// <summary>
 /// This Method performs Image verification by Sikuli4net (Asserts that Image of Chosen Element Exists on Workfield)
 /// </summary>
 /// <param name="scrollElement">Scroll Element class</param>
 public void DroppedImageIsPresent(ScrollElement scrollElement)
 {
     Pattern pattern_Element = new Pattern(Configuration.PathToImgs() + scrollElement.GetImageDropPatern());
     Screen scrn = new Screen();
     Assert.IsTrue(scrn.Exists(pattern_Element));
 }