#coding:utf-8
import time
from comm.base import Base

class LoginPage(Base):
    username_loc=("id","username")
    passwd_loc=("id","passwords")
    summit_loc=("id","submit-a")
    text_loc=("xpath","//*[@class='fn-left']/span[1]")
    def login(self,username,password):
        self.clear(self.username_loc)
        self.sendKeys(self.username_loc,username)
        self.clear(self.passwd_loc)
        self.sendKeys(self.passwd_loc,password)
        self.click(self.summit_loc)

    def is_login_success(self):
       try:
            t=self.findElements(self.text_loc).text
            return t
       except:
            print ("登录失败")
            return None



f821eff9db3d180fcd7853136d4999d230f62d6d
<mask token>


class LoginPage(Base):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def login(self, username, password):
        self.clear(self.username_loc)
        self.sendKeys(self.username_loc, username)
        self.clear(self.passwd_loc)
        self.sendKeys(self.passwd_loc, password)
        self.click(self.summit_loc)
    <mask token>

<mask token>


class LoginPage(Base):
    <mask token>
    <mask token>
    <mask token>
    <mask token>

    def login(self, username, password):
        self.clear(self.username_loc)
        self.sendKeys(self.username_loc, username)
        self.clear(self.passwd_loc)
        self.sendKeys(self.passwd_loc, password)
        self.click(self.summit_loc)

    def is_login_success(self):
        try:
            t = self.findElements(self.text_loc).text
            return t
        except:
            print('登录失败')
            return None

<mask token>


class LoginPage(Base):
    username_loc = 'id', 'username'
    passwd_loc = 'id', 'passwords'
    summit_loc = 'id', 'submit-a'
    text_loc = 'xpath', "//*[@class='fn-left']/span[1]"

    def login(self, username, password):
        self.clear(self.username_loc)
        self.sendKeys(self.username_loc, username)
        self.clear(self.passwd_loc)
        self.sendKeys(self.passwd_loc, password)
        self.click(self.summit_loc)

    def is_login_success(self):
        try:
            t = self.findElements(self.text_loc).text
            return t
        except:
            print('登录失败')
            return None

import time
from comm.base import Base


class LoginPage(Base):
    username_loc = 'id', 'username'
    passwd_loc = 'id', 'passwords'
    summit_loc = 'id', 'submit-a'
    text_loc = 'xpath', "//*[@class='fn-left']/span[1]"

    def login(self, username, password):
        self.clear(self.username_loc)
        self.sendKeys(self.username_loc, username)
        self.clear(self.passwd_loc)
        self.sendKeys(self.passwd_loc, password)
        self.click(self.summit_loc)

    def is_login_success(self):
        try:
            t = self.findElements(self.text_loc).text
            return t
        except:
            print('登录失败')
            return None

#coding:utf-8
import time
from comm.base import Base

class LoginPage(Base):
    username_loc=("id","username")
    passwd_loc=("id","passwords")
    summit_loc=("id","submit-a")
    text_loc=("xpath","//*[@class='fn-left']/span[1]")
    def login(self,username,password):
        self.clear(self.username_loc)
        self.sendKeys(self.username_loc,username)
        self.clear(self.passwd_loc)
        self.sendKeys(self.passwd_loc,password)
        self.click(self.summit_loc)

    def is_login_success(self):
       try:
            t=self.findElements(self.text_loc).text
            return t
       except:
            print ("登录失败")
            return None


