0

Is there a way of randomizing the user agent using Gecko Browser in visual studio? Example: Like creating a textbox where i can input many user-agent so when i run a url on it, it will be randomize the url per web refresh.....

Thanks.

Hashir
  • 92
  • 8
  • If you googled you would find this: https://stackoverflow.com/questions/14653627/how-to-set-user-agent-in-geckofx – Sasha May 03 '18 at 07:51
  • @Jaxi i actually know how to set a user-agent from the link you provided...but i want to randomize many user-agent per refresh – Hashir May 03 '18 at 07:54
  • Yes I'm sure there is a way. If you want to include the code you have and give an example of how you are going to access the 'random' user agents you need, then you might get a useful answer – A Friend May 03 '18 at 08:07
  • Do u have any idea of how i can do it...Thanks – Hashir May 03 '18 at 12:06
  • 2
    Read the GeckoFX documentation, understand how to capture the event of refreshing, and then from there you can use the `Random` class to generate a number and select that from an array. – Sasha May 03 '18 at 12:26

0 Answers0