no such element: Unable to locate element error in some circumstance (ASP.NET MVC)

37 views
Skip to first unread message

sql12...@gmail.com

unread,
Aug 14, 2018, 5:08:35 AM8/14/18
to Selenium Users
While  I set the breakpoint in my program , and after reaching the breakpoint , then use the next step to advance to the following statement, 
the driver.FindElementByXPath() works well, and can get the information I need, ( pls refer to  the attached file )

But if I  don't set any breakpoint on that statement, the program will show no such element: Unable to locate element  error, ( pls refer to  the attached file )

Would someone can tell me how to fix the problem ? Thanks 


Janny
successful circumstance.JPG
error.JPG

Xiang Dong

unread,
Aug 15, 2018, 5:00:44 AM8/15/18
to sql12...@gmail.com, seleniu...@googlegroups.com
I think you need some wait approach to wait the element available in the DOM. your break point may did it for you. 

--david

From: seleniu...@googlegroups.com <seleniu...@googlegroups.com> on behalf of sql12...@gmail.com <sql12...@gmail.com>
Sent: Tuesday, August 14, 2018 5:08 PM
To: Selenium Users
Subject: [selenium-users] no such element: Unable to locate element error in some circumstance (ASP.NET MVC)
 
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/7b290b03-6efc-4f6e-af07-e63a56bfa997%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages