Comments (31)
I've gotten a few reports for this issue so you certainly aren't the only one getting A/B tested with a new page. I have some time next week to look into this so I'll get a new version of debbit released that handles the new website changes.
from debbit.
The latest code on the master branch fixes this issue. I need to get the new version built and uploaded though. If you want to try this out before release v2.1.1 is out then replace the file program_files/merchants/amazon_gift_card_reload.py
with the latest copy of the same file. If you're running from source you can just pull the latest code.
from debbit.
This is the same as #59, started happening to me again a few days ago.
from debbit.
Side note, @jakehilborn, I don't think you need the for loop on line 144. You could try this xpath and see if it gives you what you're after:
//span[contains(@Class, 'pmts-cc-number') and contains(text(),'ending in " + merchant.card[-4:] + "')]/ancestor::div[contains(@Class,'pmts-instrument-box')]/descendant::input[@type='radio']
Disclaimer: I have not tried that locator in a test run yet.
from debbit.
@jakehilborn - Deleted cookies folder, ran the entire thing again, and worked without any issue! Thanks man
from debbit.
Actually, as I look at the script, I think the flow has changed on Amazon's side. The original locator is still in the DOM, but it's not clickable. Not only that, but it looks like once you fill in an amount and click buy now, it takes you to a full checkout page, that doesn't resemble what the script is looking for anymore.
from debbit.
@jakehilborn Ran into the same issue. Just the other day I was praising how well Debbit is working with Amazon and now they have changed it up to break the functionality.
from debbit.
Just started having this issue this month.
from debbit.
I just updated and it looks like it's working. Thanks!
from debbit.
Running from source, replaced the file and its getting following error "essage: Unable to locate element:[id="orderSummaryPrimaryActionBtn"]"
from debbit.
@Chief-One Bummer, I was going to push out a new release tonight but I should fix that. Can you that error report to me by either following these instructions or zipping up your failures
folder and emailing it to [email protected]?
from debbit.
@jakehilborn
I have attached the zipped-up failures folder. Redacted personal info but tags and all remaining info should be there. Looks like they are naming the button something else.
failures.zip
from debbit.
For what it's worth, the changes made recently worked for me. My checkout page shows a button that says "Use this payment method", whereas yours says "continue" I would venture to guess that since this is the button that the script is failing to locate, that the id is different. Do you know how to find locators (xpath, css, etc.) for an element on a webpage? If so, could you take a screenshot of that page and what the locators are?
from debbit.
Scratch that, turns out the script saves an html version of the page at failure. That's handy.
It looks like a slightly different flow for your scenario - one where you simply choose a card that was previously saved, without having to click a button saying to specifically use that card...
from debbit.
@Chief-One Could you try the amazon script from this feature branch? If anything, it should get one step closer to fully functional. There may be 1 or 2 more buttons to fix. It looks like your checkout cart is different than others I've seen.
from debbit.
@jakehilborn
Didn't work, the script is looking for a button with ID "continue", not sure if one exists with that
from debbit.
Looks like its named "ppw-widgetEvent:SetPaymentPlanSelectContinueEvent" and there are two tags with that name so if you are modifying it to grab it by name then need to index it as well from the list
from debbit.
@Chief-One My bad, I read the stack trace wrong. I just fixed a different wait condition, so now it should at least get a bit further. I pushed the latest code to the feature branch so that hyperlink above should have the latest fix. The good part is that the error reports contain the html file. It allows me to open that html file with debbit and poke around the DOM using selenium with a debugger.
from debbit.
: # Find Continue text, the grandparent element of the text is the clickable Continue button driver.find_element_by_xpath("//span[contains(text(),'Continue')]").find_element_by_xpath('../..').click()
Should be sibling to parent and not grandparent
``
from debbit.
@jakehilborn - Tried the latest one and moved further but complaining about "ap_password"
File "/Users/**/Library/Mobile Documents/com~apple~CloudDocs/Development/Debbit/src/debbit.py", line 294, in web_automation_wrapper result = merchant.web_automation(driver, merchant, amount) File "/Users/**/Library/Mobile Documents/com~apple~CloudDocs/Development/Debbit/src/program_files/merchants/amazon_gift_card_reload.py", line 58, in web_automation driver.find_element_by_id('ap_password').send_keys(merchant.psw) File "/Users/**/.local/share/virtualenvs/src-nhT6G4Bk/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 360, in find_element_by_id return self.find_element(by=By.ID, value=id_) File "/Users/**/.local/share/virtualenvs/src-nhT6G4Bk/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "/Users/**/.local/share/virtualenvs/src-nhT6G4Bk/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/Users/**/.local/share/virtualenvs/src-nhT6G4Bk/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="ap_password"]
from debbit.
Right, right. That actually makes sense since I forgot to also change the condition for checking if it's on the login page. I just pushed another fix.
from debbit.
: # Find Continue text, the grandparent element of the text is the clickable Continue button driver.find_element_by_xpath("//span[contains(text(),'Continue')]").find_element_by_xpath('../..').click()
I tried the grandparent thing out on the error report HTML file and it does look like it will work. Alternatively, finding the element by name works mostly well. But, it finds 3 instances even though the webpage only has 2 continue buttons. If I take that approach I'll need to add a loop that tries them in succession with some error handling.
from debbit.
@jakehilborn - So with the latest change, it reached final checkout page and failed on it. Let me grab logs for it and upload
failures.zip
Added
from debbit.
@jakehilborn - FInal order placement button also has new text looks like so script can account for ti
from debbit.
@Chief-One Pushed another update.
from debbit.
@jakehilborn - This one worked e2e!
from debbit.
@Chief-One Great! Thanks a lot for helping debug this payment flow. Could you do me one more favor? Can you delete the cookies
folder (it's inside the program_files
folder) and then run debbit? There is this verify card workflow that may or may not work.
from debbit.
Can also confirm the latest master works great with the new page, including the verify card workflow.
from debbit.
Another thumbs up. Works great. Thanks.
from debbit.
Fixed in release v2.1.1
from debbit.
I'm still getting the below error in windows after downloading the latest version. I've tried 2 diff devices on 2 separate days to verify it's not a device issue. I know I'm probably doing something wrong since everyone else says it's working. Any ideas?
v2.1.2 Windows Traceback (most recent call last):
File "debbit.py", line 294, in web_automation_wrapper
File "C:\debbit-v2.1.2-win64\program_files\merchants\amazon_gift_card_reload.py", line 191, in web_automation
if driver.find_element_by_id('subtotals-marketplace-spp-bottom').text != expected_order_total:
File "selenium\webdriver\remote\webdriver.py", line 360, in find_element_by_id
File "selenium\webdriver\remote\webdriver.py", line 976, in find_element
File "selenium\webdriver\remote\webdriver.py", line 321, in execute
File "selenium\webdriver\remote\errorhandler.py", line 242, in check_response
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="subtotals-marketplace-spp-bottom"]
from debbit.
Related Issues (20)
- Debbit Unable to Log in to Xfinity. HOT 9
- Amazon gift card page changed HOT 3
- Anti-bot measures
- Script Broken Due to Amazon Gift Card New Landing Page HOT 1
- Error Message: Unable to locate element HOT 11
- Error: Clicked "Place your order" button, but unable to confirm if order was successful. When it was successful HOT 6
- Amazon issue "Element could not be scrolled into view" HOT 5
- Support scheduling purchases every x number of months HOT 1
- Amazon reload not working HOT 11
- Program not running on its own (without manually running it) and not working at all for Amazon gift card reloads. HOT 5
- FileNotFoundError: "webdriver_prefs.json" does not exist in the path that the program is searching within HOT 2
- add support for the cards not having to be added beforehand
- `max_day: 30` causes the script to crash in Feburary
- Is this plugin abandoned now? HOT 4
- Using latest selenium deprecates many functions
- Test run
- Amazon OTP HOT 4
- Only seems to run once, even though there are multiple cards to charge in the config file HOT 2
- Fails to select payment card amazon_gift_card_reload.py HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from debbit.