def testOpenFileLocation_url(self): args = { "eventType": self.eventType, "url": self.testFilePath, "mode": 2 } cmdstring = self.cmdline(args) print(cmdstring) child1 = subprocess.Popen("dde-file-manager -d >/dev/null 2>&1", shell=True) sleep(2) #run the test (status, output) = rt(cmdstring) sleep(2) docwin = window.findWindowByAppName(self.applicationName) self.assertTrue(None != docwin) window.closeWindow(docwin) docwinclose = window.findWindowByAppName(self.applicationName, mode="nowait") self.assertTrue(None == docwinclose)
def testDecompressFile_URLLIST(self): args = { "eventType": self.eventType, "urlList": self.urllist(self.testFilePath), #"appName": self.appName, "mode": 2 } cmdstring = self.cmdline(args) print(cmdstring) child1 = subprocess.Popen("dde-file-manager -d >/dev/null 2>&1", shell=True) sleep(2) (status, output) = rt(cmdstring) docwin = window.findWindowByAppName(self.applicationName) #sleep(2) self.assertTrue(None != docwin) #sleep(2) window.closeWindow(docwin) docwinclose = window.findWindowByAppName(self.applicationName, mode="nowait") self.assertTrue(None == docwinclose) print(child1.pid) child1.kill() os.system('killall dde-file-manager')
def testOpenFileByApp_URL_APPNAME(self): args = { "eventType": self.eventType, "url": self.testFilePath, "appName": self.appName, "mode": 2 } cmdstring = self.cmdline(args) print(cmdstring) (status, output) = rt(cmdstring) docwin = window.findWindowByAppName(self.applicationName) #sleep(2) self.assertTrue(None != docwin) #sleep(2) window.closeWindow(docwin) docwinclose = window.findWindowByAppName(self.applicationName, mode="nowait") self.assertTrue(None == docwinclose)