Instapy: Login issue "//button//div[text()='Log in']

Created on 25 Feb 2019  路  6Comments  路  Source: timgrossmann/InstaPy

Hello,

i have this issue now :
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//button//div[text()='Log in']"}

Thanks

Most helpful comment

@bylezz you don't need to change anything inside quickstart, it's about the core code of Instapy. You need to change the code inside instapy/login_util.py, or wait for pulling changes when the merge is done.

All 6 comments

I have the same problem

Pull Request for a fix is coming : https://github.com/timgrossmann/InstaPy/pull/4066

I'll retest it now to see if I can catch it again
Edit: jup it's working, wait for the merge

Hello,

Can you explain a little more in detail how you fixed it?. i put this:

try:
    login_elem = browser.find_element_by_xpath(
        "//article//a[text()='Log in']")
except:
except NoSuchElementException:
    print("Login A/B test detected! Trying another string...")
    login_elem = browser.find_element_by_xpath(
        "//article//a[text()='Log In']")

Error:

File "C:\Usersguill\AppData\Local\Programs\Python\Python37-32\Lib\site-packages\quickstart.py", line 28, in
login_elem = browser.find_element_by_xpath(
NameError: name 'browser' is not defined

Thank you.
:)

@bylezz you don't need to change anything inside quickstart, it's about the core code of Instapy. You need to change the code inside instapy/login_util.py, or wait for pulling changes when the merge is done.

the change worked for me 馃憤

Was this page helpful?
0 / 5 - 0 ratings

Related issues

drogon34 picture drogon34  路  73Comments

jtrieuDev picture jtrieuDev  路  52Comments

lairdep23 picture lairdep23  路  47Comments

Tachenz picture Tachenz  路  85Comments

HCWcoder picture HCWcoder  路  79Comments