Currently, I am developing my automated test scripts using a combination of selenium-webdriver, phantomJS, and mocha.
The script I am working on is written in JavaScript.
One requirement is to wait until a specific element becomes completely visible before clicking on it.
Here is a more detailed explanation:
In the application I am testing, there are menus and submenus that can collapse. When a menu is clicked, its corresponding submenus are displayed.
My script goes through each menu item, clicks on it, and then proceeds to iterate through and click on the submenu items as well.
for(var iMajor = 2; iMajor <= majorLinkLast ; iMajor++)
{
(function(iMajor){
majorMenuXPath = "//ul[contains(@id, 'side-menu')]/li["+iMajor+"]/a";
if(iMajor != 2)
{
driver.findElement(By.xpath(majorMenuXPath)).click().then((function(iMajo...
However, I am encountering an issue with the output:
Track Revenue
Track Revenue
Track Revenue
Track Revenue
Track Revenue
Track Revenue
Campaigns
1) View page by clicking menu
2 passing (1m)
1 failing
1) TrackRevenue Click Menu Test View page by clicking menu:
Error: timeout of 50000ms exceeded. Ensure the done() callback is being cal
led in this test.
I am puzzled by this unexpected output and unable to understand why this error is occurring. I suspect that the title should have been different.
If anyone has insights or suggestions on how to resolve this issue, please provide your valuable input.