Code Monkey home page Code Monkey logo

Comments (5)

patrickhno avatar patrickhno commented on July 23, 2024

I have now also verified that this works perfectly with the selenium web driver.

from akephalos.

patrickhno avatar patrickhno commented on July 23, 2024

I even tried to press the button with javascript, and it still fails.
page.driver.execute_script("document.getElementById('save_button').click();")

from akephalos.

Nerian avatar Nerian commented on July 23, 2024

Hi Patrick,

I think that instructions sent to the HTMLUnit driver are atomic. Meaning the second click on the save button is not sent until the first has finished. It makes sense on a headlesss driver.

What happen if you do this?:

page.driver.execute_script("
  document.getElementById('save_button').click();
  document.getElementById('save_button').click();")

from akephalos.

patrickhno avatar patrickhno commented on July 23, 2024

Hi Nerian,

I am not actually trying to click a button twice. That is the result of narrowing the bug description down to a isolated case.
My need is to submit a form multiple times, like when you change search parameters and click ok.
It really bugs me that akephalos doesnt seem to support such behaviour.

I do not even receive a POST to apache on the second click with akephalos, no matter if its javascript, direct API calls or whatever.

I have full blown tests now that works perfectly with other drivers, but not at all with akephalos, as it refuses to POST to or from pages it has posted to/from before, or something like that.

I have not figured out exactly what in the code that does this. It seems to be deeper down into the htmlunit interface or something.

from akephalos.

Nerian avatar Nerian commented on July 23, 2024

Hi Patrick,

Do you still have this problem in https://github.com/Nerian/akephalos2 ?

I tried to reproduce this bug, but it works fine for me.

it "Should be able to make four requests to the same page" do
session.visit '/form'
session.click_button 'Submit'
session.click_button 'Submit'
session.click_button 'Submit'
session.body.should include('visit_number:4')
end

Is this what you were trying to do? Can you provide a failing example?

Issue a bug report at https://github.com/Nerian/akephalos2

Thanks

from akephalos.

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.