Learjet 27 Posted July 30, 2016 Report Share Posted July 30, 2016 Made a video for you guys on how to us the Click Coordinates command in ExBrowser, it's much faster that dealing with XPath voodoo that might change tomorrow :-) The coordinates won't change, here you go: https://youtu.be/E65u9ojeMmYThis enables you to code VERY quickly and has reduced the amount of code by 60% in a few of my apps. Peace,Learjet 3 Quote Link to post Share on other sites
deliter 203 Posted July 30, 2016 Report Share Posted July 30, 2016 I must admit I am impressed by your ingenuity,unique thinking to solve problems,I would suggest to start going to stackoverflow for some javascript,justby googling x,y co-ordinates I got this code,I only had to add the alert box Open up developer tools click console and run this,then when you click it will alert you the coordinates, What was your problem with Xpath that made you go to such lengths?? Ive posted a thread somewhere "CSS Click" would be straightforward to use on exbrowser if exbrowser has a run javascipt command function printMousePos(e) { var cursorX = e.pageX; var cursorY = e.pageY; alert("x:"+cursorX + " y:"+cursorY) } document.addEventListener("click", printMousePos); Quote Link to post Share on other sites
Bot-Factory 602 Posted July 31, 2016 Report Share Posted July 31, 2016 Thanks Learjet for your feedback. Just a couple of things to keep in mind: Coordinates can be different if you switch between Firefox, Chrome and PhantomJS. Sometimes they are the same, but sometimes they are not. Just keep that in mind.Also Screensize can influence it. So if you sell bots, any some of your clients have a notebook with a very small display. You bot might notwork correctly. I use Xpath 97% of the time. As soon as you get used to it, it's very quick to write. ExBrowser V1.1.9 also has a new Xpath selector (already in the beta) which allows you to ignore frames and iframes. Which makes the xpath selector within each command work way faster than before. That will be covered in the V1.1.9 documentation. RegardsDan Quote Link to post Share on other sites
Learjet 27 Posted July 31, 2016 Author Report Share Posted July 31, 2016 Thanks Learjet for your feedback. Just a couple of things to keep in mind: Coordinates can be different if you switch between Firefox, Chrome and PhantomJS. Sometimes they are the same, but sometimes they are not. Just keep that in mind. Also Screensize can influence it. So if you sell bots, any some of your clients have a notebook with a very small display. You bot might notwork correctly. I use Xpath 97% of the time. As soon as you get used to it, it's very quick to write. ExBrowser V1.1.9 also has a new Xpath selector (already in the beta) which allows you to ignore frames and iframes. Which makes the xpath selector within each command work way faster than before. That will be covered in the V1.1.9 documentation. RegardsDan Greetings,Most of the bots that I create are for social networks that are constantly changing their code to stop people from auto-posting (Facebook, et al.). Additionally, when going trough the API your daily/monthly queries are limited by Facebook which limits end users. Since the source code changes weekly it's impossible to sell a reliable bot, this command gets past the iFrame and Javascript voodoo that they place in your way. Due to branding they tend to not change their layouts so this command gives you an effective way to bypass their source code changes. Additionally, taking all of the XPath coding out of the bot reduces the amount of code overall (that can fail) which brings even more stability and makes fixes (if they do change) very easy and quick. This command was iMacros bread and butter but now it's great to see it on another platform, if it would fetch the X/Y for you it would be even better, but it's working wonderfully now. Peace,LJ Quote Link to post Share on other sites
Learjet 27 Posted July 31, 2016 Author Report Share Posted July 31, 2016 Hi deliter, You wrote: "What was your problem with Xpath that made you go to such lengths??" Please see above :-) Peace,LJ Quote Link to post Share on other sites
Bot-Factory 602 Posted July 31, 2016 Report Share Posted July 31, 2016 Greetings,Most of the bots that I create are for social networks that are constantly changing their code to stop people from auto-posting (Facebook, et al.). Additionally, when going trough the API your daily/monthly queries are limited by Facebook which limits end users. Since the source code changes weekly it's impossible to sell a reliable bot, this command gets past the iFrame and Javascript voodoo that they place in your way. Due to branding they tend to not change their layouts so this command gives you an effective way to bypass their source code changes. Additionally, taking all of the XPath coding out of the bot reduces the amount of code overall (that can fail) which brings even more stability and makes fixes (if they do change) very easy and quick. This command was iMacros bread and butter but now it's great to see it on another platform, if it would fetch the X/Y for you it would be even better, but it's working wonderfully now. Peace,LJ Awesome! Great to hear that it's making your life easier. Did you notice any problems with clients who have different screen sizes? Dan Quote Link to post Share on other sites
Learjet 27 Posted July 31, 2016 Author Report Share Posted July 31, 2016 Awesome! Great to hear that it's making your life easier. Did you notice any problems with clients who have different screen sizes? Dan Not yet, but I set it to run at a fixed screen size that can run on pretty much every screen and it's multi-threaded so I'm not too worried about customers re-sizing the screen (yet). It works very well with scroll screen too, and I have it clicking things as small as a tiny radio box and there have been no issues. Honestly, it's working very well for a beta command, love it! :-) Great job Dan! Peace,LJ 1 Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted August 1, 2016 Report Share Posted August 1, 2016 Xpath works perfectly for me. You just multiple ifs or wildcards to your xpath to make sure it will work.The problem with coordinates is when the layout of a webpage is changed you need to change all the coordinates you did.Also, it will not work will if you are going to scroll the page to click or type on something. Quote Link to post Share on other sites
deliter 203 Posted August 1, 2016 Report Share Posted August 1, 2016 You all should just learn CSS Selectors,a web page is styled on CSS Selectors,not Xpath or anything else you dont need to know javascript,just the document.querySelector("") place the copied selector,in the quotation, document.querySelector("#email") then add in the attribute you want to change, document.querySelector("#email").value="hello@example.com" If you want to scrape an attribute,just use eval navigate("http://www.facebook.com","Wait") wait for browser event("Everything Loaded","") run javascript("document.querySelector(\"#email\").value = \"hello their\"") set(#username,$eval("document.querySelector(\"#email\").value"),"Global") 1 Quote Link to post Share on other sites
Bot-Factory 602 Posted August 1, 2016 Report Share Posted August 1, 2016 It all depends on what you try to do.Keep on mind, ExBrowser also supports native CSS selectors. instead of x: use c: to enable CSS mode. BUT.. css selectors are also looking for elements and attributes. I mean it's still html code right. That doesn't change with the parsing engine you use. And if you look for an element with a specific attribute today and it works, but that element is not longer there tomorrow, then it really doesn't matter if you use Xpath or CSS selectors. CSS is a little bit faster, but honestly that really doesn't matter for what we do with it. And it doesn't support text() contains. But yeah, if you struggle with Xpath and you know CSS selectors better. Use them. If you prefer Xpath and it does the job, use xpath. ExBrowser Plugin has you covered whatever you prefer 1 Quote Link to post Share on other sites
deliter 203 Posted August 1, 2016 Report Share Posted August 1, 2016 It all depends on what you try to do. Keep on mind, ExBrowser also supports native CSS selectors. instead of x: use c: to enable CSS mode. BUT.. css selectors are also looking for elements and attributes. I mean it's still html code right. That doesn't change with the parsing engine you use. And if you look for an element with a specific attribute today and it works, but that element is not longer there tomorrow, then it really doesn't matter if you use Xpath or CSS selectors. CSS is a little bit faster, but honestly that really doesn't matter for what we do with it. And it doesn't support text() contains. But yeah, if you struggle with Xpath and you know CSS selectors better. Use them. If you prefer Xpath and it does the job, use xpath. ExBrowser Plugin has you covered whatever you prefer Wow that's pretty awesome that you include CSS too built in,if I had the money I would probably purchase the tool You should do a post about this 1 Quote Link to post Share on other sites
Learjet 27 Posted August 1, 2016 Author Report Share Posted August 1, 2016 Xpath works perfectly for me. You just multiple ifs or wildcards to your xpath to make sure it will work.The problem with coordinates is when the layout of a webpage is changed you need to change all the coordinates you did.Also, it will not work will if you are going to scroll the page to click or type on something.You have the same limitations with Xpath, if the code changes then your Xpath is crap, branded sites are more likely to change their code than their branded layout. Additionally it works perfectly with scrolling as I mentioned earlier. Peace,LJ Quote Link to post Share on other sites
Learjet 27 Posted August 1, 2016 Author Report Share Posted August 1, 2016 . Quote Link to post Share on other sites
deliter 203 Posted August 1, 2016 Report Share Posted August 1, 2016 . 1 Quote Link to post Share on other sites
Learjet 27 Posted August 1, 2016 Author Report Share Posted August 1, 2016 . Quote Link to post Share on other sites
deliter 203 Posted August 1, 2016 Report Share Posted August 1, 2016 . Quote Link to post Share on other sites
Learjet 27 Posted August 1, 2016 Author Report Share Posted August 1, 2016 . Quote Link to post Share on other sites
myubotforumaccount 0 Posted March 30, 2017 Report Share Posted March 30, 2017 Made a video for you guys on how to us the Click Coordinates command in ExBrowser, it's much faster that dealing with XPath voodoo that might change tomorrow :-) The coordinates won't change, here you go: https://youtu.be/E65u9ojeMmYThis enables you to code VERY quickly and has reduced the amount of code by 60% in a few of my apps. Peace,Learjet Thanks Learjet for your feedback. Just a couple of things to keep in mind: Coordinates can be different if you switch between Firefox, Chrome and PhantomJS. Sometimes they are the same, but sometimes they are not. Just keep that in mind. Also Screensize can influence it. So if you sell bots, any some of your clients have a notebook with a very small display. You bot might notwork correctly. I use Xpath 97% of the time. As soon as you get used to it, it's very quick to write. ExBrowser V1.1.9 also has a new Xpath selector (already in the beta) which allows you to ignore frames and iframes. Which makes the xpath selector within each command work way faster than before. That will be covered in the V1.1.9 documentation. RegardsDanthe video do not work any more, will you show another link?for exbroswer coodinate, the valve of x position and y position is the same as the ones i get from ubot mouse click wizard? i am using exbroswer plugin 1.3.1.0the position i get from ubot mouse click wizard not work for me Quote Link to post Share on other sites
sheiku 1 Posted May 28, 2017 Report Share Posted May 28, 2017 Hi Learjet Please tell me what tool do you use to find x y mouse position relative in browser..Because i use a plugin in chrome to find mouse position, but when i launch the chrome it is without plugins, and i cant build easy my aplication without the x y pos. I am also new and i struggle a lot with xpath syntax.Thank you Dan Quote Link to post Share on other sites
TheMcD 6 Posted June 4, 2017 Report Share Posted June 4, 2017 I'm a new user to exBrowser, and this thread got me thinking... Could exBrowser be made to find and image on a page (like you can with the default uBot)..? I'm not at my computer, but that'd be a killer feature, as well as add some nice functionality, since sites a lot of times keeps the images the same, but the code itself changes. Quote Link to post Share on other sites
Bot-Factory 602 Posted June 5, 2017 Report Share Posted June 5, 2017 I'm a new user to exBrowser, and this thread got me thinking... Could exBrowser be made to find and image on a page (like you can with the default uBot)..? I'm not at my computer, but that'd be a killer feature, as well as add some nice functionality, since sites a lot of times keeps the images the same, but the code itself changes. It could of course. Almost everything can be coded. The question is always.. How complicated is it, and is it worth the development time? So, no I will probably not add something complex like this. Because honestly I had not a single problem with clicking something on a website. Most of the time it's just about finding the right way to do it. Kindest regardsDan Quote Link to post Share on other sites
TheMcD 6 Posted June 6, 2017 Report Share Posted June 6, 2017 It could of course. Almost everything can be coded. The question is always.. How complicated is it, and is it worth the development time? So, no I will probably not add something complex like this. Because honestly I had not a single problem with clicking something on a website. Most of the time it's just about finding the right way to do it. Kindest regardsDanThanks Dan. It's not about being able to finding what to click code-wise, but to me, it's about two things: 1. Having been a programmer of some sorts since the 1980s, I've seen the programming world get more "nerdy", and miss the newer programmers. Finding an image is quicker than learning all the "nerd" that programming has become today. * 2. I have seen more often than not, certain sites change their code to foil bots, but NOT change the image. If a bit is based on code, it would break too often. If the bot used images, a lot less breakage. * Side Rant: Back in the day, you used to be able to buy books that didn't assume much of anything and taught programming with good examples, etc. Nowadays too much is assumed from everything from CSS, to Python, etc. etc. I feel bad for new people that want to learn because I think too much of the training material doesn't know how to teach, and assumes too much. Quote Link to post Share on other sites
Bot-Factory 602 Posted June 6, 2017 Report Share Posted June 6, 2017 Thanks Dan. It's not about being able to finding what to click code-wise, but to me, it's about two things: 1. Having been a programmer of some sorts since the 1980s, I've seen the programming world get more "nerdy", and miss the newer programmers. Finding an image is quicker than learning all the "nerd" that programming has become today. * 2. I have seen more often than not, certain sites change their code to foil bots, but NOT change the image. If a bit is based on code, it would break too often. If the bot used images, a lot less breakage. * Side Rant: Back in the day, you used to be able to buy books that didn't assume much of anything and taught programming with good examples, etc. Nowadays too much is assumed from everything from CSS, to Python, etc. etc. I feel bad for new people that want to learn because I think too much of the training material doesn't know how to teach, and assumes too much. Hi. I agree. I'll consider it for the future. But it for sure will be a payed upgrade. I can't add such a complex feature for free. This will require many hours of coding and testing.And I'm not sure if enough people would buy it, to justify the development costs of it to be honest. But we will see. Thanks though for the suggestion. RegardsDan Quote Link to post Share on other sites
TheMcD 6 Posted June 6, 2017 Report Share Posted June 6, 2017 Hi. I agree. I'll consider it for the future. But it for sure will be a payed upgrade. I can't add such a complex feature for free. This will require many hours of coding and testing.And I'm not sure if enough people would buy it, to justify the development costs of it to be honest. But we will see. Thanks though for the suggestion. RegardsDanI agree. It should be a paid upgrade, as it would be a major feature upgrade. 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.