예제 #1
0
    def testDragDockIconToDesktop(self):
        icongedit_icon = self.ddedockobject.child(self.gediticonname)
        self.assertTrue(icongedit_icon != None)
        fromXY = utils.getDockIconCenterPoint(icongedit_icon)
        utils.mouseDrag(fromXY, (fromXY[0], fromXY[1] - 100))

        ddedock = utils.getDdeDockObject()
        icongedit_icon_later = ddedock.child(self.gediticonname)
        self.assertTrue(None == icongedit_icon_later)
예제 #2
0
    def testDragDockIconToDesktop(self):
        iconscreenshot = self.ddedockobject.child(self.screenshoticonname)
        fromXY = utils.getDockIconCenterPoint(iconscreenshot)
        utils.mouseDrag(fromXY, (fromXY[0], fromXY[1] - 100))

        ddedock = utils.getDdeDockObject()
        iconscreenshot_later = ddedock.child(self.screenshoticonname)
        self.assertTrue((0, 0) == iconscreenshot_later.position)
        self.assertTrue((0, 0) == iconscreenshot_later.size)
예제 #3
0
 def test_dragtodel_dfm(self):
     dockobject_dfm = utils.getDdeDockObject()
     iconobj_dfm = dockobject_dfm.child(self.icon_dfm)
     self.assertTrue(iconobj_dfm.showing)
     starting_point = utils.getDockIconCenterPoint(iconobj_dfm)
     utils.mouseDrag(starting_point,
                     (starting_point[0], starting_point[1] - 100))
     iconobj_dfm_later = utils.getDdeDockObject().child(self.icon_dfm)
     self.assertFalse(iconobj_dfm_later.showing)
예제 #4
0
    def testDragTerminalIconToDesktop(self):
        iconterminal = self.ddedockobject.child(self.terminaliconname)
        fromXY = utils.getDockIconCenterPoint(iconterminal)
        utils.mouseDrag(fromXY, (fromXY[0], fromXY[1] - 100))

        ddedock = utils.getDdeDockObject()
        try:
            iconterminal_later = ddedock.child(self.terminaliconname)
        except:
            self.assertTrue(True)
예제 #5
0
 def test_dragtodel_dmusic(self):
     pid = os.fork()
     if 0 == pid:
         (status, output) = getstatusoutput('google-chrome')
         os._exit(0)
     dockobject_dmusic = utils.getDdeDockObject()
     iconobj_dmusic = dockobject_dmusic.child(self.icon_dmusic)
     self.assertTrue(iconobj_dmusic.showing)
     # iconobj_dmusic.click()
     starting_point = utils.getDockIconCenterPoint(iconobj_dmusic)
     utils.mouseDrag(starting_point,
                     (starting_point[0], starting_point[1] - 100))
     iconobj_dmusic_later = utils.getDdeDockObject().child(self.icon_dmusic)
     self.assertFalse(iconobj_dmusic_later.showing)
예제 #6
0
    def testMenuDock(self):
        if self.dockname in self.dockApps:
            appCoor = self.dock.getAppCoor(self.dock.string_Google_Chrome)
            screen = pyautogui.size()
            screen_center = (screen[0]/2,screen[1]/2)
            #pyautogui.mouseDown(appCoor)
            #pyautogui.dragTo(screen_center, duration=2)
            utils.mouseDrag(appCoor, (appCoor[0], appCoor[1] - 100))
            time.sleep(2)

        dockApps = self.dock.getAllDockApps()
        self.assertNotIn(self.dockname, dockApps)
        self.launcher.menuDock(self.dock.string_Google_Chrome)
        dockApps = self.dock.getAllDockApps()
        self.assertIn(self.dockname, dockApps)