TypeError: 'module' object is not callable error in robot framework.

问题描述 投票:0回答:1

我没有导入任何类。我试图使用Robot框架启动UI测试案例。请看下面的代码,谁能帮帮我。

    *** Settings ***
Library    SeleniumLibrary
*** Test Cases ***
LoginTest
    create webdriver    chrome  executable_path="driver path"
    open browser    "https://innovate.dev-ais.corecompete.com/dashboard"    chrome
    click button    xpath=//span[text()='Sign In']//parent::button

我收到以下错误信息。

    LoginTest                                                             | FAIL |
TypeError: 'module' object is not callable
------------------------------------------------------------------------------
TC001                                                                 | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
testing robotframework
1个回答
0
投票

请按照评论区的建议去做。

我还想说,这可能是由于大写的 chrome因为在所有的文档中,浏览器的名称都是以大写字母开头的(例如Selenium库的文档 此处),所以在你的情况下,它将是 Chrome. 这里描述了同样的错误信息。https:/github.comrobotframeworkSeleniumLibraryissues529#issuecomment-256335082。 而问题似乎是出在资本化上。

© www.soinside.com 2019 - 2024. All rights reserved.