Issue
I want to wait for a page to load and take screenshots using python selenium but the element disappears after 2 seconds.
I used WebDriverWait(browser,10).until(ec.presence_of_element_located((By.CLASS_NAME,'msgBox success')))
but not worked.
<span id="attachCVMsgBox" tabindex="-1"><div><div tabindex="0" class="msgBox success"><div class="cnt"><i class="icon">Success</i><p class="head">Success</p><p class="msg">Resume has been successfully uploaded.</p></div></div></div></span>
I want to take a screenshot when I get success
Solution
we can get the element by following the code by using Xpath
WebDriverWait(browser,100).until(ec.presence_of_element_located((By.XPATH,'//*[@id="attachCVMsgBox"]/div')))
Answered By - Rahul
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.