Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

虫师,wait和find写反了吧 #1

Closed
liang1vs1 opened this issue Nov 28, 2018 · 1 comment
Closed

虫师,wait和find写反了吧 #1

liang1vs1 opened this issue Nov 28, 2018 · 1 comment

Comments

@liang1vs1
Copy link

def wait(self, context):
    try:
        return context.find_element(*self.locator)
    except NoSuchElementException:
        return None

def find(self, context):
    for i in range(self.time_out):
        if self.wait(context) is not None:
            return self.wait(context)
        else:
            sleep(1)
    else:
        return None
@defnngj
Copy link
Collaborator

defnngj commented Nov 28, 2018

wait()find() 为内部方法,在命名上欠妥,wait() 改为 get_element()较为合适,不过,这并不影响使用。

defnngj pushed a commit that referenced this issue Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants