Beispiel #1
0
	def _callDialer(self):
		#Launch call app
		self._launchPhone()

		#Select dialer
		d(text = '拨号').click.wait()
		assert d(resourceId = 'com.android.contacts:id/call_classic').wait.exists(timeout=5000),'Switch to dialer UI failed!'

		#Dial u.getNumber()
		if u.getNumber() == '10010':
			d(description = '一').click.wait()
			d(description = '零').click.wait()
			d(description = '零').click.wait()
			d(description = '一').click.wait()
			d(description = '零').click.wait()
		else:
			d(description = '一').click.wait()
			d(description = '零').click.wait()
			d(description = '零').click.wait()
			d(description = '八').click.wait()
			d(description = '六').click.wait()

		d(resourceId = 'com.android.contacts:id/call_classic').click.wait()

		self._operateDuringCalling()
Beispiel #2
0
	def testSendSMSWithMaxChar(self):
		#Launch message app and enter new message screen
		self._launchAndEnterNewMsg()

		#Input receiver and content
		self._editTestContent(u.getNumber(),SMS_MAX_CONTENT)
		
		#Send SMS
		self._sendMessage()
Beispiel #3
0
	def testSendSMSWithMaxCharViaSim2(self):
		#Launch message app and enter new message screen
		self._launchAndEnterNewMsg()

		#Switch to sim card 2
		d(resourceId = 'com.android.mms:id/msim_switch').long_click()
		assert d(textContains = '卡 2').wait.exists(timeout = 5000),'Switch to sim card 2 failed in 5s!'

		#Input receiver and content
		self._editTestContent(u.getNumber(),SMS_MAX_CONTENT)
		
		#Send SMS
		self._sendMessage()
Beispiel #4
0
	def _callCallLog(self):
		# create call log
		self._operateCallLog('add',u.getNumber(),3)
		#Launch call app
		d.start_activity(component='com.android.contacts/.activities.DialtactsActivity')
		assert d(text = '拨号').wait.exists(timeout=5000), 'Launch call app failed in 5s!'

		# select call log
		d(text = '通话记录').click.wait()
		assert d(resourceId = 'com.android.contacts:id/tab_call_log_missed').wait.exists(timeout=5000),'Switch to calllog failed in 5s!'
		d(text = '全部').click.wait()

		#Select call log
		d(textStartsWith = 'Test').click.wait()

		self._operateDuringCalling()
Beispiel #5
0
 def testMultiTaskTelephony(self):
     # make a phone call
     commands.getoutput("adb shell am start -n com.android.contacts/.activities.DialtactsActivity")
     d(text="拨号").click.wait()
     d(resourceId="com.android.contacts:id/digits").set_text(u.getNumber())
     d(resourceId="com.android.contacts:id/call_classic").click.wait()
     d.sleep(1)
     d.press("home")
     # launch app
     for i in APP_TEL_LIST:
         commands.getoutput("adb shell am start -n %s" % i)
         d.sleep(5)
         d.press("home")
         d.sleep(1)
     d.press("home")
     d.swipe(540, 1, 540, 500, 10)
     d.sleep(1)
     if d(text="当前通话").exists:
         d(text="当前通话").click.wait()
         d(text="结束").click.wait()
     d.press("home")
     assert d(packageName="com.smartisanos.launcher").exists, "Launcher is not show on the screen!"
Beispiel #6
0
	def testMultiTaskTelephony(self):
		# make a phone call
		commands.getoutput('adb shell am start -n com.android.contacts/.activities.DialtactsActivity')
		d(text = '拨号').click.wait()
		d(resourceId = 'com.android.contacts:id/digits').set_text(u.getNumber())
		d(resourceId = 'com.android.contacts:id/call_classic').click.wait()
		d.sleep(1)
		d.press('home')
		# launch app
		for i in APP_TEL_LIST:
			commands.getoutput('adb shell am start -n %s'%i)
			d.sleep(5)
			d.press('home')
			d.sleep(1)
		d.press('home')
		d.swipe(540,1,540,500,10)
		d.sleep(1)
		if d(text = '当前通话').exists:
			d(text = '当前通话').click.wait()
			d(text = '结束').click.wait()
		d.press('home')
		assert d(packageName = 'com.smartisanos.launcher').exists,'Launcher is not show on the screen!'