codesidian / Python-MissionChiefBot

A Python bot for the online game MissionChief
Other
12 stars 15 forks source link

element click intercepted #21

Closed jackbayliss closed 4 years ago

jackbayliss commented 4 years ago

Oh no, an error occurred! Message: element click intercepted: Element <input type="checkbox" value="143231" class="vehicle_checkbox" id="vehicle_checkbox_143231" name="vehicle_ids[]" fms="2" building_id="75483_68573" custom_="1" tractive_random="0" ignore_aao="0" vehicle_type_ignore_default_aao="0" tractive_vehicle_id="0" tractive_building_random="0" trailer_vehicle_id="0" fire="1" rw="1" ab_ruest_rw="1" vehicle_type_id="16" lf_only="1" possible_tractive="[]" hlf_only="1"> is not clickable at point (635, 881). Other element would receive the click: <div class="container-fluid">...</div> (Session info: chrome=79.0.3945.130)

The above occurs if an account has a huge amount of vehicles, because the checkbox isn't within the view it will fail checking it, even if existing.

To fix: Make the bot scroll to the checkbox.

May have to switch splinter to selenium as don't think splinter offers scrolling to element.

jackbayliss commented 4 years ago

Should be fixed with https://github.com/codesidian/Python-MissionChiefBot/commit/e5c0584002aebd656bd537a1bd3d123ef2092b2f#diff-04393d5bd218b03d4e1c551a8b718523R286