Пример #1
0
	def portForward(self):
		adapter.clickApp()
		adapter.srcollAction('bottom')
		adapter.waitandClick('//*[@id="AppList"]/ul[4]/a[4]/li')
		if self.enable == '0':
			adapter.alwaysCloseSwitch('//*[@id="SwitchFwd"]', 'data-value')
		else :
			adapter.alwaysOpenSwitch('//*[@id="SwitchFwd"]')
			self.actionFun()
Пример #2
0
    def setDmz(self):
        adapter.clickApp()
        time.sleep(1)

        adapter.srcollAction('bottom')
        adapter.waitandClick('//*[@id="AppList"]/ul[5]/a[1]/li')
        adapter.alwaysOpenSwitch('//*[@id="Switch"]', 'data-value')
        adapter.waitandSendkeys('//*[@id="DmzIp"]', self.ip)
        adapter.waitandClick('//*[@id="Save"]')
Пример #3
0
    def upnp(self):
        adapter.clickApp()
        time.sleep(1)
        adapter.executeJS(
            "var q = document.getElementById('Content').scrollTop=10000")
        adapter.waitandClick('//*[@id="AppList"]/ul[5]/a[2]/li')

        if self.enable == '1':
            adapter.alwaysOpenSwitch('//*[@id="UpnpSwitch"]', 'data-value')
        else:
            adapter.alwaysCloseSwitch('//*[@id="UpnpSwitch"]', 'data-value')
Пример #4
0
	def parentCtrl(self):
		#adapter.waitandClick
		adapter.clickApp()
		adapter.waitandClick('//*[@id="AppList"]/ul[1]/a[4]/li')
		adapter.alwaysOpenSwitch('//*[@id="SwitchParent"]', 'data-value')
		adapter.waitforDisappear('//*[@id="Pop"]')
		if self.action == 'add':
			self.addRule()
		elif self.action == 'modify':
			self.modifyRule()
		elif self.action == 'delete':
			self.delRule()
		else :
			print("please input right action: add, modify, delete")
Пример #5
0
    def SeniorSet(self, flag=True):
        adapter.executeJS(
            "var q = document.getElementById('Content').scrollTop=10000")
        adapter.waitandClick('//*[@id="SeniorSet"]')
        adapter.waitandSendkeys('//*[@id="Mtu"]', self.mtu)
        adapter.executeJS(
            "var q = document.getElementById('Content').scrollTop=10000")

        if flag:
            adapter.alwaysOpenSwitch('//*[@id="Switch"]', 'data-value')
            adapter.executeJS(
                "var q = document.getElementById('Content').scrollTop=10000")
            adapter.waitandSendkeys('//*[@id="SeniorPrimDns"]', self.dns1)
            adapter.waitandSendkeys('//*[@id="SeniorSecDns"]', self.dns2)