Giter Club home page Giter Club logo

Comments (2)

jakehilborn avatar jakehilborn commented on July 18, 2024

The best way I can help debug this is using debbit's built in failure recording since it will show a screenshot, a copy of the webpage HTML, and the lines of code executed in the merchant automation.

Whatever you currently have working, could you run it via debbit? Make sure you have pulled the latest code from the master branch. In the failures folder there will be files with timestamps for names. Each timestamp will have 4 pieces now; .txt, .png, .html, and a folder ending in coverage. Upload them to this GitHub Issue and I'll help.

from debbit.

dave-sWpR46Ae avatar dave-sWpR46Ae commented on July 18, 2024

I went ahead and did so, removing the hardcoded stuff and hopefully all the identifying information.

failures.zip

The key is here though:

v1.0.2-dev Traceback (most recent call last): File "debbit.py", line 292, in web_automation_wrapper result = merchant.web_automation(driver, merchant, amount) File "C:\Run\debbit\Testing\debbit-master\src\program_files\merchants\tds_bill_pay.py", line 78, in web_automation driver.find_element_by_xpath("//span[contains(text(), 'Submit Payment')]").click() #submit payment1 File "C:\Users\John\.virtualenvs\src-cm535gzh\lib\site-packages\selenium\webdriver\remote\webelement.py", line 80, in click self._execute(Command.CLICK_ELEMENT) File "C:\Users\John\.virtualenvs\src-cm535gzh\lib\site-packages\selenium\webdriver\remote\webelement.py", line 633, in _execute return self._parent.execute(command, params) File "C:\Users\John\.virtualenvs\src-cm535gzh\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\John\.virtualenvs\src-cm535gzh\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementNotInteractableException: Message: Element <span id="button-1194-btnInnerEl" class="x-btn-inner x-btn-inner-default-medium"> could not be scrolled into view

I want to click button-1196, not button 1194, as 1194 and 1195 are unclickable. The only difference between them is the ID (which I can't hardcode) and the style. Here's the 3 links in the website that are giving me issues:

<a class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-medium" style="min-width: 80px; margin-right: 5px; margin-left: 5px; display: none;" hidefocus="on" unselectable="on" role="button" aria-hidden="true" aria-disabled="false" id="button-1194" tabindex="0" data-componentid="button-1194"><span id="button-1194-btnWrap" data-ref="btnWrap" role="presentation" unselectable="on" style="" class="x-btn-wrap x-btn-wrap-default-medium "><span id="button-1194-btnEl" data-ref="btnEl" role="presentation" unselectable="on" style="" class="x-btn-button x-btn-button-default-medium x-btn-text    x-btn-button-center "><span id="button-1194-btnIconEl" data-ref="btnIconEl" role="presentation" unselectable="on" class="x-btn-icon-el x-btn-icon-el-default-medium  " style=""></span><span id="button-1194-btnInnerEl" data-ref="btnInnerEl" unselectable="on" class="x-btn-inner x-btn-inner-default-medium" style="">Submit Payment</span></span></span></a>

<a class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-medium" style="min-width: 80px; margin-right: 5px; margin-left: 5px; display: none;" hidefocus="on" unselectable="on" role="button" aria-hidden="true" aria-disabled="false" id="button-1195" tabindex="0" data-componentid="button-1195"><span id="button-1195-btnWrap" data-ref="btnWrap" role="presentation" unselectable="on" style="" class="x-btn-wrap x-btn-wrap-default-medium "><span id="button-1195-btnEl" data-ref="btnEl" role="presentation" unselectable="on" style="" class="x-btn-button x-btn-button-default-medium x-btn-text    x-btn-button-center "><span id="button-1195-btnIconEl" data-ref="btnIconEl" role="presentation" unselectable="on" class="x-btn-icon-el x-btn-icon-el-default-medium  " style=""></span><span id="button-1195-btnInnerEl" data-ref="btnInnerEl" unselectable="on" class="x-btn-inner x-btn-inner-default-medium">Submit Payment</span></span></span></a>

<a class="x-btn x-unselectable x-box-item x-toolbar-item x-btn-default-medium" style="min-width: 80px; margin: 0px; right: auto; top: 0px; left: 764px;" hidefocus="on" unselectable="on" role="button" aria-hidden="false" aria-disabled="false" id="button-1196" tabindex="0" data-componentid="button-1196"><span id="button-1196-btnWrap" data-ref="btnWrap" role="presentation" unselectable="on" style="" class="x-btn-wrap x-btn-wrap-default-medium "><span id="button-1196-btnEl" data-ref="btnEl" role="presentation" unselectable="on" style="" class="x-btn-button x-btn-button-default-medium x-btn-text    x-btn-button-center "><span id="button-1196-btnIconEl" data-ref="btnIconEl" role="presentation" unselectable="on" class="x-btn-icon-el x-btn-icon-el-default-medium  " style=""></span><span id="button-1196-btnInnerEl" data-ref="btnInnerEl" unselectable="on" class="x-btn-inner x-btn-inner-default-medium">Submit Payment</span></span></span></a>

If I could make this line:
driver.find_element_by_xpath("//span[contains(text(), 'Submit Payment')]").click() #submit payment1
click the third box with "submit payment" as text, it would work.

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.