1

Im trying to automatically accept a steam trade offer but absolutely am not able to click the "Verify trade contents" button. I have tried everything including finding by xpath, id and etc etc... but everytime it just tells me "[]" for it being unable to find the element, even though everything is correct and ive tried everything thousand times.

I was able to just directly change the value of the elements "onclick" variable to "True" just by typing "ToggleReady('True')" to the inspect element console, would there be a way to somehow do that from splinter?

the elements code:

<div class="readystate short" id="you_notready" onclick="ToggleReady( true );" style="">
                            <div class="content">
                                Confirm trade contents                                  <span id="notready_tradechanged_message" style="display: none;">
                                    Offer changed.                                  </span>
Jaypaque
  • 59
  • 8

2 Answers2

0

Seems to be, that button appears after main DOM is loaded. Check if it is true. If that button loaded asynchronous, you should wait till button loaded, so python script can parse it and click.

Oleksiy
  • 794
  • 2
  • 14
  • 39
  • main DOM? im not sure what you mean but if you mean that the problem is that my program tries to click the button before its loaded, its not it because ive been just manually typing these commands in the python "console" – Jaypaque Aug 02 '17 at 11:44
0

The "Verify trade content" appears as a usable button after every single item in the trade is loaded. For example, if I trade 30 CS:GO Keys, the trade offer window will load all the items informations, and after the entire page is totally loaded with all items displayed with their informations, the button will become usable.

You should search for this button after a certain time or when you detect that the page has been loaded.

Louis 'LYRO' Dupont
  • 1,052
  • 4
  • 15
  • 35
  • The window within the splinter browser has been open for like 2 hours now and its still not finding it – Jaypaque Aug 02 '17 at 11:57