perl - How to check if Selenium's find_element did find it? -


i'm using perl's selenium::remote::driver module (or selenium::chrome), , in code, have find first element has class="myclass" :

my $elem = $selenium->find_element("myclass","class"); 

how know if driver did find it, or if didn't (because there no such class in page)?

in both cases (element found or not), seem getting selenium::remote::webelement object back. if ->click (even in eval block), whole script dies

"an element not located on page using given search parameters: myclass,class name @ ...".

how can catch error?


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -