Hello,
I have an problem while using selenium on JS and changing webagents.
When my selenium visits site secured by CloudFlare the following alert prompts: "The owner of this website (sitelink) has banned your access based on your browser's signature" .
I don't know what is wrong. I use random-useragent module for getting useragents strings and than I put it to selenium while building like this:
Thanks for help!
I have an problem while using selenium on JS and changing webagents.
When my selenium visits site secured by CloudFlare the following alert prompts: "The owner of this website (sitelink) has banned your access based on your browser's signature" .
I don't know what is wrong. I use random-useragent module for getting useragents strings and than I put it to selenium while building like this:
Code:
userAgent = random_useragent.getRandom(function (ua) { return userAgent = ua.browserName === 'Chrome'; })
driver = new webdriver.Builder()
.withCapabilities({
browserName: "chrome",
chromeOptions: {args:['user-agent="' + userAgent + '"'] }
}).build();
Thanks for help!