Commit 6ef8c665 authored by gaotao's avatar gaotao

手动添加打开网页代码&新增故意伤害罪测试

parent a3d90735
......@@ -6,8 +6,12 @@ browserName = Chrome
[testUrl]
#URL = https://www.baidu.com
URL = http://192.168.2.31/cm
JBAQ_URL = http://192.168.2.31/cm/currencydeal/{bmsah}/case?bmsah={bmsah}
;URL = http://192.168.2.31/cm
URL = http://2u8997d500.zicp.vip:46630/cm
JBAQ_URL = http://2u8997d500.zicp.vip:46630/cm/currencydeal/{bmsah}/case?bmsah={bmsah}
SCJL_URL = http://2u8997d500.zicp.vip:46630/cm/currencydeal/{bmsah}/conclusion?bmsah={bmsah}&stage=GS&tysah=33030420200123700&ysay={ysay}
BD_URL = http://www.baidu.com
;JBAQ_URL = http://192.168.2.31/cm/currencydeal/{bmsah}/case?bmsah={bmsah}
[userInfo]
username=周朝阳
password=qazwsxedc
......@@ -22,4 +26,8 @@ database=cmrobot
#起诉案件
[gsjdCase]
#考虑循环
caseId=瓯检起诉受[2020]33030400557号
# 盗窃罪
caseId_dqz=瓯检起诉受[2020]33030400557号
# 故意伤害罪
caseId_gyshz=瓯检起诉受[2020]33030400881号
caseName=陈小秋诈骗案
......@@ -11,4 +11,7 @@ markers= login
gsjd
reset
basicmatter1
basicmatter
\ No newline at end of file
basicmatter
lxfz
lxfz1
demo
......@@ -13,6 +13,7 @@ def test_addxyr(engine):
# case_id = engine.get_caseId('caseId')
# url = basic_url.format(bmsah=case_id)
# engine.driver.get(url)
engine.get_page(engine.DQZ)
xyr_add = engine.driver.xpath("//div[@class='plus___1ckgY']")
if not xyr_add:
engine.logger.info('没有基本信息!!查看具体情况')
......@@ -40,6 +41,8 @@ def test_addxyr(engine):
@pytest.mark.delxyr
@get_engine(__file__,'JBAQ_URL')
def test_addxyr(engine):
engine.get_page(engine.DQZ)
xyr_list = engine.driver.xpath("//div[contains(@class,'item___2HoCU')]")
xyr_last = xyr_list[-1]
# 删除犯罪嫌疑人
......@@ -73,6 +76,8 @@ def test_addxyr(engine):
@pytest.mark.nullxyr
@get_engine(__file__,'JBAQ_URL')
def test_null_xyr(engine):
engine.get_page(engine.DQZ)
# js = '''document.querySelector("#起诉意见书_犯罪嫌疑人_0_犯罪嫌疑人姓名").value = "";'''
# engine.driver.execute_script(js)
......@@ -89,6 +94,8 @@ def test_null_xyr(engine):
@pytest.mark.basicmatter
@get_engine(__file__,'JBAQ_URL')
def test_nullbirth(engine):
engine.get_page(engine.DQZ)
time.sleep(0.5)
# js = '''document.querySelector("//div[@title='出生日期']/following-sibling::div[1]//input").value = "";'''
# engine.driver.execute_script(js)
......@@ -106,6 +113,8 @@ def test_nullbirth(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_nullID(engine):
engine.get_page(engine.DQZ)
time.sleep(0.5)
# js = '''document.querySelector("#起诉意见书_犯罪嫌疑人_0_身份证号码").value="";'''
# engine.driver.execute_script(js)
......@@ -139,6 +148,8 @@ def test_nullID(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_notnulledu(engine):
engine.get_page(engine.DQZ)
engine.driver.xpath("//div[@id='起诉意见书_犯罪嫌疑人_0_文化程度']")[0].click()
engine.driver.xpath("//li[@data='小学']")[0].click()
time.sleep(0.5)
......@@ -153,6 +164,7 @@ def test_notnulledu(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_nullDomicile(engine):
engine.get_page(engine.DQZ)
# js = '''document.querySelector("//input[@id='起诉意见书_犯罪嫌疑人_0_户籍所在地']").value = "";'''
# engine.driver.execute_script(js)
......@@ -170,6 +182,8 @@ def test_nullDomicile(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_notnullDomicile(engine):
engine.get_page(engine.DQZ)
input = engine.driver.xpath("//input[@id='起诉意见书_犯罪嫌疑人_0_户籍所在地']")[0]
input.clear()
input.send_keys('123')
......@@ -184,6 +198,7 @@ def test_notnullDomicile(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_nulladdr(engine):
engine.get_page(engine.DQZ)
# js = '''document.querySelector("//input[@id='起诉意见书_犯罪嫌疑人_0_住址']").value = "";'''
# engine.driver.execute_script(js)
......@@ -200,6 +215,8 @@ def test_nulladdr(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_notnulladdr(engine):
engine.get_page(engine.DQZ)
input = engine.driver.xpath("//input[@id='起诉意见书_犯罪嫌疑人_0_住址']")[0]
input.clear()
input.send_keys('123')
......@@ -227,6 +244,8 @@ def test_notnulladdr(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_notnullSpecifPerson(engine):
engine.get_page(engine.DQZ)
engine.driver.xpath("//div[@id='起诉意见书_犯罪嫌疑人_0_特定人员']")[0].click()
engine.driver.xpath("//li[@data='聋哑人']")[0].click()
time.sleep(0.5)
......@@ -255,6 +274,8 @@ def test_notnullSpecifPerson(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_notnullSpecialID(engine):
engine.get_page(engine.DQZ)
engine.driver.xpath("//div[@id='起诉意见书_犯罪嫌疑人_0_特殊身份']")[0].click()
engine.driver.xpath("//li[@data='国家工作人员']")[0].click()
time.sleep(0.5)
......@@ -268,6 +289,7 @@ def test_notnullSpecialID(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_nullFilingTime(engine):
engine.get_page(engine.DQZ)
# js = '''document.querySelector("//div[@title='立案时间']/following-sibling::div[1]//input").value = "";'''
# engine.driver.execute_script(js)
......@@ -284,6 +306,8 @@ def test_nullFilingTime(engine):
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_IncorrectFormatFilingTime(engine): # 立案时间为空
engine.get_page(engine.DQZ)
input =engine.driver.xpath("//div[@title='立案时间']/following-sibling::div[1]//input")[0]
input.clear()
input.send_keys('5月5日')
......@@ -298,6 +322,8 @@ def test_IncorrectFormatFilingTime(engine): # 立案时间为空
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_correctFormatFilingTime(engine): # 立案时间格式于标准不一致
engine.get_page(engine.DQZ)
input = engine.driver.xpath("//div[@title='立案时间']/following-sibling::div[1]//input")[0]
input.clear()
input.send_keys('2020年05月05日')
......@@ -313,6 +339,8 @@ def test_correctFormatFilingTime(engine): # 立案时间格式于标准不一致
@pytest.mark.basicmatter
@get_engine(__file__, 'JBAQ_URL')
def test_nullmeasure(engine): # 强制措施为空
engine.get_page(engine.DQZ)
# js = '''document.querySelector("#起诉意见书_犯罪嫌疑人_0_当前强制措施情况_案情摘要").value="";'''
# engine.driver.execute_script(js)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment