Vel-San / wbmbot_v2

WBMBOT_v2 is a Selenium-based Python bot designed to automate the application process for new flats listed by WBM GmbH. It prioritizes speed and efficiency to ensure your application is among the first to be considered in the random selection process for apartment viewings.
https://hub.docker.com/r/vel7an/wbmbot_v2
MIT License
9 stars 2 forks source link

[BUG] "Details" or "Ansehen" button not iterating properly when applying to several apartments #1

Closed Vel-San closed 6 months ago

Vel-San commented 6 months ago

Describe the bug If the bot finds several flats on the page that match your requirements, it will attempt to apply to them 1 by 1. The problem here is that once it is done applying to the first flat, it goes back to the main page "Angebote" page.

It fails to jump to the second flat button with "flat_elem" getting stale, because the page was refreshed! But the "flat_obj" is properly updated.

The bug is really simple to fix but I just cannot fix it properly if there are no flats available to test it out 😢

To Reproduce Attempt to apply on 2 flats, 2nd flat will fail (to be precise, it will apply to the first flat twice instead of apply to both)

Expected behavior Should apply to all flats 1 by 1

Screenshots N/A

Environment

Additional context Related bug lines:

flat_elem (Fails to update as intended and is always taking the first element in the list):

flat_obj (Works properly, updates its values as intended):

Vel-San commented 6 months ago

Most likely fixed by https://github.com/Vel-San/wbmbot_v2/commit/1d1053a99a240c47e5d9aec4ffbea01fe8dc115a