0

Selenium WebDriver

asked 2014-03-30 07:33:03 +0800

Naif92 gravatar image Naif92
1

I am using Selenium IDE and Selenium web driver testng in eclipse .. my testing is against ZK application ..

the test case works fine on Selenium IDE ..

but when I run it in eclipse with selenium web driver (testng) I got an error ..

the error come when I click in button then grid table comes .. then the webdriver can not find the element ..

selenium.open("xxx");
selenium.click("//li[2]/div/div/div/span");
Thread.sleep(3000);
selenium.doubleClick("//div[2]/div[2]");
Thread.sleep(3000);

the error was in this code ..

//div[2]/div[2]

the element not found .. its works fine with selenium IDE .. and I check with firepath .. the Xpath is correct !

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2024-01-30 19:20:55 +0800

sarfarazszk gravatar image sarfarazszk
1

It seems like you're encountering an issue when transitioning from Selenium IDE to Selenium WebDriver in Eclipse for your testing against a ZK application. The error occurs when trying to locate an element using the XPath "//div[2]/div[2]." While the XPath might be correct, WebDriver might need some additional time to load the element. Try adding an explicit wait using WebDriverWait to ensure the element is present before interacting with it. This can help synchronize your script with the application's loading process, resolving the "element not found" issue.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2014-03-30 07:33:03 +0800

Seen: 19 times

Last updated: Jan 30

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More