1
當我將fram索引更改爲1時,我得到以下內容。
Traceback (most recent call last):
File "/home/ro/selem.py", line 6, in <module>
driver.switch_to.frame(1)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/switch_to.py", line 67, in frame
self._driver.execute(Command.SWITCH_TO_FRAME, {'id': frame_reference})
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/webdriver.py", line 201, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.4/dist-packages/selenium/webdriver/remote/errorhandler.py", line 181, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchFrameException: Message: Unable to locate frame: 1
Stacktrace:
at FirefoxDriver.prototype.switchToFrame (file:///tmp/tmpyickpa63/extensions/[email protected]/components/driver-component.js:10717)
at DelayedCommand.prototype.executeInternal_/h (file:///tmp/tmpyickpa63/extensions/[email protected]/components/command-processor.js:12617)
at DelayedCommand.prototype.executeInternal_ (file:///tmp/tmpyickpa63/extensions/[email protected]/components/command-processor.js:12622)
at DelayedCommand.prototype.execute/< (file:///tmp/tmpyickpa63/extensions/[email protected]/components/command-processor.js:12564)
感謝的人,這個工作。 – booberz