Search code examples
javasearch-enginebingprogrammatically-createdbing-search

Programmatically insert multiple Chars into Bing search engine and perform search for each


I’ve made a simple Java program that loops through 100 elements of type char. With each iteration it prints out the char to the console using System.out.println. It does this for all 100 chars so at the end the output is 100 chars to the console.

I would like to take the output of each iteration as it comes in the sequence and insert that into the Bing search engine then perform a search automatically while seeing the updated results within Bing. It should do this 100 times for all char elements, so there should be 100 individual char insertions each with them doing a search within Bing.

If it’s not clear I’ve provided a video link of exactly what I mean, you can see how normally I have to type 1 and press enter to perform a search, and then keep doing that to get 100 searches while seeing the results get updated each time. I would like my loop in my program to do this programmatically, if such a thing is possible.

I’m open to use any language as long as it can run on Windows 10, but would prefer Java if possible.


Solution

  • I believe this can be achieved with Selenium (https://www.seleniumhq.org/ and https://www.guru99.com/introduction-webdriver-comparison-selenium-rc.html). It allows you to open browsers and interact with the elements (click, enter data...).

    I'm more of a Python guy so I can't provide you code but here's a page that can get you started:

    https://www.guru99.com/accessing-forms-in-webdriver.html