FaucetCryptoBot icon indicating copy to clipboard operation
FaucetCryptoBot copied to clipboard

I have a suggestion about xpath

Open oyi77 opened this issue 4 years ago • 4 comments

Hi, how if you make xpath code more flexible, not based on position but by search. something like this : "//*[contains(text(), 'Get Reward')]" instead of this : /html/body/div[1]/div[2]/main/div/div/div[3]/div[1]/div[2]/div[2]/div[1]/div/div/div[2]/button

oyi77 avatar Mar 01 '21 18:03 oyi77

Hi I did try this out by partial text matching but only some worked while the others didn't and the bot also lost the ability to figure out which section that particular element belonged to.

souravrs999 avatar Mar 02 '21 01:03 souravrs999

i've changed some of your xpath with that method, and it works better. i think, you can try to use some function like parent and child to get where the elements exact location. It will take sometime to modify, but it will works like charm, even when the website updating itself.

and maybe you want to try to make bot for autodutchycorp? the logic is actually nearly the same with faucetcrypto. but its generating more money.

Thanks for your hardwork, even you say this is your first bot, but i think its a excellent bot!

oyi77 avatar Mar 02 '21 16:03 oyi77

Hi mate tnx for the info I'm pretty new to selenium and automation so I'm not well versed enough, I'm also not maintaining this bot anymore cause of huge workloads in my workplace this was more of a side project so I don't know if I will update it in the future looking for contributers currently who can improve the bot.

souravrs999 avatar Mar 03 '21 01:03 souravrs999

i've changed some of your xpath with that method, and it works better. i think, you can try to use some function like parent and child to get where the elements exact location. It will take sometime to modify, but it will works like charm, even when the website updating itself.

and maybe you want to try to make bot for autodutchycorp? the logic is actually nearly the same with faucetcrypto. but its generating more money.

Thanks for your hardwork, even you say this is your first bot, but i think its a excellent bot!

Could you share your xpath file @oyi77

metapodcod avatar Mar 08 '21 10:03 metapodcod