SweTech 4 Posted October 2, 2019 Report Share Posted October 2, 2019 Hey guys! So, I'm trying to manipulate the field on the bottom of this page that is connected to Google Maps https://www.hemnet.se/bostad/radhus-4rum-kungalv-kungalvs-kommun-olserodsgatan-30-16350104 What I want is to input a value and then scrape the result - https://monosnap.com/file/L7b02fiaMbEE2dVlXo4B2fehkPz4P3 However, I just can't get it working and it feels like I've tried everything. Any help would be greately appreciated Quote Link to post Share on other sites
fastlinks 16 Posted October 2, 2019 Report Share Posted October 2, 2019 ** run with ubot4the type text action do not give auto complete/suggestion in ubot5 ** for ubot 5, replace the "type text" with "type key" plugin command("WindowsCommands.dll", "type keys", "*- UBot Studi*", "HwndWrapper[uBot Studio.exe;;aba3cc11-cf39-4fa5-b688-c9b03dc8ec7b]", 880, 635, #keyword)---------------------------------- navigate("https://www.hemnet.se/bostad/radhus-4rum-kungalv-kungalvs-kommun-olserodsgatan-30-16350104", "Wait")wait for browser event("DOM Ready", "")wait for element(<class="consent-modal__button button button--primary">, 3, "Appear")if($exists(<class="consent-modal__button button button--primary">)) { then { click(<class="consent-modal__button button button--primary">, "Left Click", "No") }}wait for element(<class="consent-modal__button button button--primary">, 3, "Appear")if($exists(<class="consent-modal__button button button--primary">)) { then { click(<class="consent-modal__button button button--primary">, "Left Click", "No") }}focus(<address line1 field>)click(<id="direction-address">, "Left Click", "No")set(#keyword, "Vasapla", "Global")type text(<id="direction-address">, #keyword, "Standard")set(#suggestion, $scrape attribute(<class="suggestions__list">, "innertext"), "Global")clear list(%suggest)add list to list(%suggest, $list from text(#suggestion, $new line), "Delete", "Global")set(#place, $list item(%suggest, 0), "Global")alert(#place)click(<outerhtml="<li>{#place}</li>">, "Left Click", "No")wait(1)set(#distancetime, $trim($plugin function("File Management.dll", "$Find Regex First", $scrape attribute(<class="direction-stats">, "innertext"), "(.|\\n)*?(?=Visa)")), "Global")alert(#distancetime) Quote Link to post Share on other sites
SweTech 4 Posted October 4, 2019 Author Report Share Posted October 4, 2019 Thanks a lot! Quote Link to post Share on other sites
SweTech 4 Posted October 5, 2019 Author Report Share Posted October 5, 2019 Unfortunately I can't get the code working Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.