Hi there. I am new and experimenting while I teach myself.
I am attempting to create a bot that will search a shopify store for a defined product term a user defines in an excel file. Then selects the first instance of that search term. – It will then go on to add the item to the cart and checkout but I am stuck on simply selecting the item after it searches.
I can get my bot to this page I am using as an example: Search Results
“barrits” is the search term in this example
I would like the bot to click the first item in the list that pops up when the search is performed. MY first thought would be to just use the click element and define the selector- Since no matter what search term the user puts in, the results will be selectable items of the same shape and size (despite different names and images). This does not work the way I need. I can get this to work for the search term “barrits” but it is not flexible enough where if the user changes the search term then it still selects the first instance. - I assume because the name the website gives the object is important.
I am wondering how you all might go about achieving what I am trying to do, thank you.
Just to give you an idea o where I am headed with this: I will eventually want the bot to select the item and add it to the cart - but if there is no item from the search results I would want it to perform the search again and again continuously until either an item does pop up or the user aborts the bot.