我有一個硒測試,我試圖起牀和運行,但一個問題是,它必須選擇一個框架,並在它失敗。硒測試沒有選擇內框
的HTML看起來像這樣
<iframe src="#" name="mainframe" id="mainframe" />
和蟒蛇測試使用命令
sel.select_frame("mainframe")
,當我運行測試,我得到這樣的
sel.select_frame("mainframe") File "/usr/lib/python2.4/site-packages/selenium/selenium/selenium.py", line 901, in select_frame self.do_command("selectFrame", [locator,]) File "/usr/lib/python2.4/site-packages/selenium/selenium/selenium.py", line 217, in do_command raise Exception, data Exception: ERROR: Element mainframe not found