代码部分见下: driver.switch_to.context('WEBVIEW_xx.xx.xx') print('denglu',driver.current_context) time.sleep(5) driver.find_element_by_xpath('/html/body/div[3]/div[1]/span').click() driver.find_element_by_xpath('//*[@id="registerButton"]').click()