TA的每日心情 | 开心 2017-2-23 09:15 |
---|
签到天数: 13 天 连续签到: 1 天 [LV.3]测试连长
|
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException
import unittest, time, re
class test(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Chrome()
self.driver.implicitly_wait(30)
self.base_url = "http://test.robotscloud.com/"
self.verificationErrors = []
self.accept_next_alert = True
def test_(self):
driver = self.driver
driver.get(self.base_url + "/")
driver.find_element_by_link_text(u"立即注册").click()
driver.find_element_by_id("submit").click()
driver.find_element_by_id("email").clear()
driver.find_element_by_id("email").send_keys("163.com")
driver.find_element_by_id("submit").click()
driver.find_element_by_id("email").clear()
driver.find_element_by_id("email").send_keys("cylan_123@sina.com")
driver.find_element_by_id("submit").click()
定位不到“立即注册” ,想问问这种时候一般怎么定位 为什么这样定位
|
|