0
私はセレンをインストールしており、Pythonで実行できます。 私がpyCharmでintを実行しようとすると、以下のエラーが発生します。私はpyCharmのインストール方法と場所と関係があるかもしれないと信じていますが、動作させることができません。 Python、Selenium、ChromeDriverを使用してオートメーションスクリプトを実行できるように、pyCharmをどのように設定する必要があるかについてのヘルプを探しており、24時間5分ごとにトリガーされるように設定しています。 スクリプト:selenium.webdriver.common.keysインポートキーpyCharm Selenium Pythonの文字列をスキャン中に
browser= webdriver.Chrome("D:/Projects/chromedriver.exe")
browser.get("https://url.com/")
formElem= browser.find_element_by_name('email')
formElem.send_keys('[email protected]')
zipElem=browser.find_element_by_name('zipcode')
zipElem.send_keys('93101')
EnterNowElem=browser.find_element_by_xpath('//input[@value="Enter Now"]')
#EnterTagElem=browser.find_element_by_class_name("")
EnterNowElem.click()
から webdriverをセレンのインポートから が、私は次のエラーを取得します。
"C:\Program Files (x86)\Python36-32\python.exe"
C:/Users/rxper/Desktop/PycharmProjects/Automation/formsubmit.py
Traceback (most recent call last):
File "C:/Users/rxper/Desktop/PycharmProjects/Automation/formsubmit.py", line 1, in <module>
from selenium import webdriver
File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\__init__.py", line 18, in <module>
from .firefox.webdriver import WebDriver as Firefox # noqa
File "C:\Program Files (x86)\Python36-32\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 19, in <module>
import http.client as http_client
File "C:\Program Files (x86)\Python36-32\lib\http\client.py", line 71, in <module>
import email.parser
File "C:\Users\rxper\Desktop\PycharmProjects\Automation\email.py", line 31
'Subject: So long.\nDear Alice, so long and thanks for all the fish. Sincerely,
^
SyntaxError: EOL while scanning string literal
Process finished with exit code 1
chromedriver.exeのパスを確認できますか?あなたは未加工の文字列として試すことができます 'r" D:\ Projects \ chromedriver.exe "' –
私はいくつかのインデント問題、コード上の不要な空白のようです。可能であれば、あなたのコードのスクリーンショットを共有できますか? –
こんにちは@MaheshKaria chromedriver.exeはあります。コピーして貼り付けた – GauchoRoger