In details information page, there are three TAB page: [basic information] [WeChat order] [operation log]
HTML below:
Open the [information] for details page, the default display basic information page, click on the [WeChat order] success switch
But, and then click on the [operation log] or [basic information], an error;
The code is as follows:
PyCharm error is as follows:
CodePudding user response:
Accurate?CodePudding user response:
Problem resolved: click with JS to use:Click with JS to perform="execute_script (), use the
Element=driver. Find_element_by_xpath ('//* [@ id="TAB - the menu"]/li [4] ')
Driver. Execute_script (" the arguments [0]. Click ();" Element),