Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
How to fix System.Reflection.TargetInvocationException
Ashok Reddy
6y
389
1
Reply
I am Developing POM with Page Factory in Selenium automation Script with C#. but, when I am trying to click on same Element second Time, I am getting Exception like:
"System.Reflection.TargetInvocationException","OpenQA.Selenium.StaleElementReferenceException"
. Plese, tell me how to fix that.
MyAccountHeadCarotMaster.Click();
MyReports.Click();
MyJob1.Click();
Thread.Sleep(4000);
MyAccountHeadCarotMaster.Click();
Reports.Click();
MyJob2.Click();
Thread.Sleep(4000);
MyAccountHeadCarotMaster.Click();
Reports.Click();
MyJob3.Click();
Thread.Sleep(4000);
MyAccountHeadCarotMaster.Click();
Reports.Click();
MyJob4.Click();
Thread.Sleep(4000);
MyAccountHeadCarotMaster.Click();
Reports.Click();
MyJob5.Click();
Thread.Sleep(4000);
MyAccountHeadCarotMaster.Click();
Reports.Click();
MyJob6.Click();
Thread.Sleep(4000);
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
file converting
How to work with SSL pop Up in selenium?