charlesbel / Microsoft-Rewards-Farmer

A simple bot that uses selenium to farm Microsoft Rewards written in Python
MIT License
1.01k stars 267 forks source link

[BUG] webdriver issue #122

Closed leandoerdeath closed 1 year ago

leandoerdeath commented 2 years ago

tried running the script and got hit with this

Traceback (most recent call last): File "C:\Users\JIJAT\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 773, in login(browser, account['username'], account['password']) File "C:\Users\JIJAT\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 46, in login browser.find_element_by_name("loginfmt").send_keys(email) AttributeError: 'WebDriver' object has no attribute 'find_element_by_name'

Prabh-Saini commented 2 years ago

Hey, i'm not an expert, but it looks like you're running some older version of the script. You can try downloading the script by click the green button that says "Code" and "Download ZIP", here. If that doesn't work, you can also try forks of this repository especially because this one is no longer updated regularly. I personally also have my own version that I created, which relies on some of this code base but overall, a bit different, not sure if it will work for you.

AlexyGalaxy commented 1 year ago

tried running the script and got hit with this

Traceback (most recent call last): File "C:\Users\JIJAT\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 773, in login(browser, account['username'], account['password']) File "C:\Users\JIJAT\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\ms_rewards_farmer.py", line 46, in login browser.find_element_by_name("loginfmt").send_keys(email) AttributeError: 'WebDriver' object has no attribute 'find_element_by_name'

Make sure you have manually logged into your bing rewards account and clicked join microsoft rewards to show you the "Microsoft Bing Dashboard".

If that doesnt work, comment out the following lines of code around line 31 and 32 to disable headless mode and watch the script work.

if headless_mode : #comment out to disable headless mode (makes window visable)

options.add_argument("--headless")

If THAT doesnt work uninstall everything and reinstall using this README.

How to Install: -Install zip from GitHub: https://github.com/charlesbel/Microsoft-Rewards-Farmer

-Install Python https://www.python.org/downloads/ Select custom installation, change nothing hit yes until installed.

-Open Microsoft-Rewards-Farmer-master, move requirements.txt to C:\Users\Alex

Open command prompt. win + R>CMD, then type (without quotes): 'pip install -r requirements.txt' Press enter

Install Google Chrome.

Install ChromeDriver from https://chromedriver.chromium.org/downloads Place the file in X:\Windows (X as your Windows disk letter)

Edit the accounts.json.sample with your accounts credentials and rename it by removing .sample at the end If you want to add more than one account, the syntax is the following : [ { "username": "Your Email", "password": "Your Password" }, { "username": "Your Email", "password": "Your Password" } ]

How to Fix Mobile: Comment out around line 134-138 with double quotes above and below ""

Refresh page

browser.get('https://bing.com/')
# Wait 5 seconds
time.sleep(10)
#Update Counter
""

How to run Script: Run the script by double clicking on ms_rewards_farmer.py