having trouble debugging selenium threads

I find it very difficult to debug django tests with selenium. Basically I set up a form and post it by clicking on the button. The breakpoints I put in the test code work fine. but after submit_button.click(), most of the time wing does not stop at the requested breakpoint.

Do you have any hint?

piscvau's avatar
601
piscvau
asked 2025-04-06 13:30:48 -0500
Wingware Support's avatar
4.2k
Wingware Support
updated 2025-04-08 07:33:05 -0500
edit flag offensive 0 remove flag close merge delete

Comments

Does Wing stop if you insert an assert 0 at the breakpoint location? If it doesn't, the debugger probably isn't connected to the process executing the code.

Wingware Support's avatar Wingware Support (2025-04-07 23:21:09 -0500) edit

Does selenium start sub-processes? If so, enabling Debug Child Processes under the Debug/Execute tab in Project Properties might solve it. You can check if the place where the breakpoint is located runs in the same process space or not by printing at os.getpwd() at that location.

Wingware Support's avatar Wingware Support (2025-04-08 07:32:43 -0500) edit
add a comment see more comments