# https://www.wjx.cn/jq/87910206.aspx
import random
from DrissionPage import Chromium
browser = Chromium()
tab = browser.new_tab('https://www.wjx.cn/jq/87910206.aspx')
divs = tab.eles('@class=div_question')
# 单选
for i in range(10):
# print(divs[i].text)
ul = divs[i].ele('@class=ulradiocheck')
# 获取所有答案选项
lis = ul.eles('tag:li')
random.choice(lis).click()
# 多选
for i in range(10, 12):
# print(divs[i].text)
ul = divs[i].ele('@class=ulradiocheck')
# 获取所有答案选项
lis = ul.eles('tag:li')
for k in range(2, len(lis) + 1):
random.choice(lis).click()