Sikuli,IDE 中的 [错误] SyntaxError (“不匹配的输入 '' 期待 EOF”,)

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

我有错误消息,我不知道为什么,我不明白。你能帮我吗?

click("1421761210416.png")
type("word" + Key.ENTER)
click("1421761958712.png")

    if not exists("1421763759437.png"):

        type("1421761996196.png", '[email protected]')
        type("1421762031575.png", "password")
        click("1421762050819.png")
        find("1421762541898.png")
    else: 
        click("1421763045705.png")


Errors:
[error] script [ test ] stopped with error in line 4 at column 4
[error] SyntaxError ( "mismatched input '' expecting EOF", )
ide eof sikuli
1个回答
0
投票

代码缩进不正确。

click("1421761210416.png")
type("word" + Key.ENTER)
click("1421761958712.png")

if not exists("1421763759437.png"):
    type("1421761996196.png", '[email protected]')
    type("1421762031575.png", "password")
    click("1421762050819.png")
    find("1421762541898.png")
else: 
    click("1421763045705.png")

您的缩进表明您的 if 应该是其他循环的一部分/如果它不是。

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