Giter Club home page Giter Club logo

Comments (31)

jakehilborn avatar jakehilborn commented on July 18, 2024 4

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.

jakehilborn avatar jakehilborn commented on July 18, 2024 4

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.

jamesgol avatar jamesgol commented on July 18, 2024 1

This is the same as #59, started happening to me again a few days ago.

from debbit.

bjhiltbrand avatar bjhiltbrand commented on July 18, 2024 1

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.

Chief-One avatar Chief-One commented on July 18, 2024 1

@jakehilborn - Deleted cookies folder, ran the entire thing again, and worked without any issue! Thanks man

from debbit.

bjhiltbrand avatar bjhiltbrand commented on July 18, 2024

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.

Chief-One avatar Chief-One commented on July 18, 2024

@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.

darkknight7777777 avatar darkknight7777777 commented on July 18, 2024

Just started having this issue this month.

from debbit.

jamesgol avatar jamesgol commented on July 18, 2024

I just updated and it looks like it's working. Thanks!

from debbit.

Chief-One avatar Chief-One commented on July 18, 2024

Running from source, replaced the file and its getting following error "essage: Unable to locate element:[id="orderSummaryPrimaryActionBtn"]"

from debbit.

jakehilborn avatar jakehilborn commented on July 18, 2024

@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.

Chief-One avatar Chief-One commented on July 18, 2024

@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.

bjhiltbrand avatar bjhiltbrand commented on July 18, 2024

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.

bjhiltbrand avatar bjhiltbrand commented on July 18, 2024

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.

jakehilborn avatar jakehilborn commented on July 18, 2024

@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.

https://github.com/jakehilborn/debbit/blob/secondary_amazon_checkout/src/program_files/merchants/amazon_gift_card_reload.py

from debbit.

Chief-One avatar Chief-One commented on July 18, 2024

@jakehilborn
Didn't work, the script is looking for a button with ID "continue", not sure if one exists with that

failures.zip

from debbit.

Chief-One avatar Chief-One commented on July 18, 2024

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.

jakehilborn avatar jakehilborn commented on July 18, 2024

@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.

Chief-One avatar Chief-One commented on July 18, 2024

@jakehilborn

: # 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
Screen Shot 2021-08-26 at 11 32 31 PM
``

from debbit.

Chief-One avatar Chief-One commented on July 18, 2024

@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.

jakehilborn avatar jakehilborn commented on July 18, 2024

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.

jakehilborn avatar jakehilborn commented on July 18, 2024

@jakehilborn

: # 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
Screen Shot 2021-08-26 at 11 32 31 PM
``

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.

Screen Shot 2021-08-26 at 9 44 34 PM

from debbit.

Chief-One avatar Chief-One commented on July 18, 2024

@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.

Chief-One avatar Chief-One commented on July 18, 2024

Screen Shot 2021-08-26 at 11 58 48 PM

@jakehilborn - FInal order placement button also has new text looks like so script can account for ti

from debbit.

jakehilborn avatar jakehilborn commented on July 18, 2024

@Chief-One Pushed another update.

from debbit.

Chief-One avatar Chief-One commented on July 18, 2024

@jakehilborn - This one worked e2e!

from debbit.

jakehilborn avatar jakehilborn commented on July 18, 2024

@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.

Screen Shot 2021-08-27 at 10 14 12 AM

from debbit.

stevenmirabito avatar stevenmirabito commented on July 18, 2024

Can also confirm the latest master works great with the new page, including the verify card workflow. 🎉

from debbit.

d3vdays avatar d3vdays commented on July 18, 2024

Another thumbs up. Works great. Thanks.

from debbit.

jakehilborn avatar jakehilborn commented on July 18, 2024

Fixed in release v2.1.1

from debbit.

darkknight7777777 avatar darkknight7777777 commented on July 18, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.