Forum Discussion

jack_edwards's avatar
jack_edwards
Occasional Contributor
10 years ago

Invalid Callee in Firefox

TC10 does not add empty span objects to the object browser, which means you can't add them to your NameMapping file.  I am using the code below to click one of these empty span objects in order to wo...
  • TanyaYatskovska's avatar
    10 years ago

    Hi Jack,

     

    I’m not sure. However, can you check if the following script works for you?

    var obj = // obtain the path to the emailIconBar object;
     
    //find the html element
    var obj = page.FindChildByXPath("//SPAN[@class='DocumentSelect hide']", false);
     
    // Check the result
    if (obj != null)
    {
       // If the element was found, click it
       obj.Click();
    }
    else
       Log.Error("The element was not found.");

     

    I’m referring to the HTML source of the page and looking for the hidden HTML object. Please read the "Finding Web Objects Using XPath Expressions" (http://smartbear.com/viewarticle/62117/ ) help topic for details.