最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

python - SeleniumBase not entering @ in email field when logging into a website - Stack Overflow

programmeradmin0浏览0评论

I am trying to log in to apollo.io using seleniumbase.

When I open the page the program should enter the email, password and click the log in button, but for some reason it doesn't enter the @ in the email. It enters only exampleemail instead of [email protected].

What could be the reason for that?

Here is the code:

from seleniumbase import Driver
import time

# Your login credentials
EMAIL = '[email protected]'
PASSWORD = 'password123'
URL = ";sortAscending=false&sortByField=recommendations_score&contactEmailExcludeCatchAll=true"

# Initialize WebDriver
driver = Driver(uc=True, headless=False)
driver.get(URL)

# Wait for login form and fill credentials
driver.wait_for_element("name=email", timeout=10)
driver.type("name=email", EMAIL)
driver.type("name=password", PASSWORD)

# Click the login button
driver.click('//button[contains(@class, "zp-button zp_GGHzP zp_ZUsLW")]')

# Wait for redirection
time.sleep(5)

# Close driver
driver.quit()

I am trying to log in to apollo.io using seleniumbase.

When I open the page the program should enter the email, password and click the log in button, but for some reason it doesn't enter the @ in the email. It enters only exampleemail instead of [email protected].

What could be the reason for that?

Here is the code:

from seleniumbase import Driver
import time

# Your login credentials
EMAIL = '[email protected]'
PASSWORD = 'password123'
URL = "https://app.apollo.io/#/lists/65d0e9cf01e8a200010c8eb2?page=1&sortAscending=false&sortByField=recommendations_score&contactEmailExcludeCatchAll=true"

# Initialize WebDriver
driver = Driver(uc=True, headless=False)
driver.get(URL)

# Wait for login form and fill credentials
driver.wait_for_element("name=email", timeout=10)
driver.type("name=email", EMAIL)
driver.type("name=password", PASSWORD)

# Click the login button
driver.click('//button[contains(@class, "zp-button zp_GGHzP zp_ZUsLW")]')

# Wait for redirection
time.sleep(5)

# Close driver
driver.quit()
Share Improve this question asked yesterday SolidOptSolidOpt 11312 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

This is something that could happen with non-QWERTY / foreign keyboards.

It's not specific to Selenium / SeleniumBase... PyAutoGUI is also affected:

pyautogui cannot write the @ symbol

There are workarounds available, which use https://pypi./project/pyperclip/:

  • https://github/asweigart/pyautogui/issues/259#issuecomment-595389901

Google has some info about that too:

发布评论

评论列表(0)

  1. 暂无评论