After running your XPath query against the page link you provided, no results were retrieved. You mentioned you need to get the name and link of top 10 restaurants.
You are on the right track with a loop, but I would modify it a bit to iterate a list of WebElement instead of generating locators within the loop:
# find list of all restaurant links on page
# this retrieves 24 restaurant links
restaurant_link_list = browser.find_elements_by_xpath("//div[contains(@class, 'restaurant_shelf_item')]/div/a")
# find list of all restaurant names on page
# this retrieves 24 restaurant names
restaurant_name_list = browser.find_elements_by_xpath("//div[contains(@class, 'restaurant_shelf_item')]/div/div/div[@class='item name']")
# loop through first 10 restaurants and print their name / link
for i in range(0, 10):
# get restaurant link
link = restaurant_link_list[i].get_attribute("href")
print(link)
# get restaurant name
name = restaurant_name_list[i].get_attribute("title")
print(name)
The output is:
https://www.tripadvisor.com/Restaurant_Review-g1080422-d10167691-Reviews-Sabatic-Sant_Cugat_del_Valles_Catalonia.html
Sabatic
https://www.tripadvisor.com/Restaurant_Review-g1080422-d7076969-Reviews-El_Vi_de_Deu-Sant_Cugat_del_Valles_Catalonia.html
El Vi de Deu
https://www.tripadvisor.com/Restaurant_Review-g1080422-d4546707-Reviews-Dakidaya-Sant_Cugat_del_Valles_Catalonia.html
Dakidaya
https://www.tripadvisor.com/Restaurant_Review-g1080422-d11892809-Reviews-Nemesis_Gastronomia-Sant_Cugat_del_Valles_Catalonia.html
Nemesis Gastronomia
https://www.tripadvisor.com/Restaurant_Review-g1080422-d3981558-Reviews-La_Pina_de_Plata-Sant_Cugat_del_Valles_Catalonia.html
La Pina de Plata
https://www.tripadvisor.com/Restaurant_Review-g1080422-d10694292-Reviews-Masia_Can_MagI-Sant_Cugat_del_Valles_Catalonia.html
Masia Can MagI
https://www.tripadvisor.com/Restaurant_Review-g1080422-d2281259-Reviews-Bocca_Restaurant_Club-Sant_Cugat_del_Valles_Catalonia.html
Bocca Restaurant & Club
https://www.tripadvisor.com/Restaurant_Review-g1080422-d10733699-Reviews-Andonie_pastissers-Sant_Cugat_del_Valles_Catalonia.html
Andonie pastissers
https://www.tripadvisor.com/Restaurant_Review-g1080422-d10195584-Reviews-Restaurant_Brau-Sant_Cugat_del_Valles_Catalonia.html
Restaurant Brau
https://www.tripadvisor.com/Restaurant_Review-g1080422-d10365477-Reviews-La_Rita-Sant_Cugat_del_Valles_Catalonia.html
La Rita
Note that for reading static content from a page as such, you may find it more efficient to use the Python Requests library -- however, if you wish to using Selenium, this code will accomplish what you are looking to do.