79578463

Date: 2025-04-17 04:26:45
Score: 1
Natty:
Report link
#You just need to use try and except statements eg:

try:
    rev=container_of_reviews.find_element(locator_of_element)
except:
    #selenium driver cannot find the element so it will execute this block of code after
    # the try block retrieve an error.eg use case:
    rev=None
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Nader Nofal