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);
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Joginder BangerPosted Dec 6, 2017, 4:08 AM