fastlinks 16 Posted March 1, 2019 Report Share Posted March 1, 2019 i try to scrape the contact list from skype (web version), but i am not able to scroll to bottom to load more contact from this scroll bar.i think it need to run javascript, anyone know how to do it in exbrowser? thanks a lot.http://7url.com/ubotimg/scrolldown.jpg Quote Link to post Share on other sites
hare ram 23 Posted March 2, 2019 Report Share Posted March 2, 2019 window.scrollTo(0,document.body.scrollHeight); Use ^ code in run exbrowser javascript code.. Quote Link to post Share on other sites
fastlinks 16 Posted March 2, 2019 Author Report Share Posted March 2, 2019 hi, thanks for the answer but the code you provide is to scroll the main page.if you see the screenshot, the skype contact list is NOT on the main page, but a javascript pop up, so the above code wont work. Quote Link to post Share on other sites
HelloInsomnia 1103 Posted March 2, 2019 Report Share Posted March 2, 2019 Try this, 0 is the offset so set that to be a different number if you need larger offset, and don't forget to change the class name. You can also target by id if possible, which would be better: var element = document.getElementsByClassName('class name')[0]; element.scrollTo(0, element.scrollHeight); Quote Link to post Share on other sites
fastlinks 16 Posted March 3, 2019 Author Report Share Posted March 3, 2019 plugin command("ExBrowser.dll", "ExBrowser Run Javascript", "var element = document.getElementsByClassName(\'slider\')[1]; element.scrollTo(5, element.scrollHeight);") Thanks for your help, but i tested with the code above and it do not move the slider. here is the web skypehttps://preview.web.skype.com/ Quote Link to post Share on other sites
HelloInsomnia 1103 Posted March 3, 2019 Report Share Posted March 3, 2019 You will probably have to play around with it to find the right element. Try to find the container it's in and scroll that. You can use various methods like: https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementByIdhttps://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassNamehttps://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByNamehttps://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByTagName For a quick and easy way to grab different elements. 1 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.