Unable to click/select the SPAN id

classic Classic list List threaded Threaded
Locked 6 messages Options
Reply | Threaded
Open this post in threaded view
|

Unable to click/select the SPAN id

swtester
Hi

  When to try to click a button which is in span id(given below the tag of that element)
, it is unable to locate the element

    Create Record


I tried with the following locators

 id, xpath, link, partiallink, css selector

Please let me know

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Unable to click/select the SPAN id

swtester


Hi

  When to try to click a button which is in span id(given below the tag of that element)
, it is unable to locate the element

   
SPAN id=actiontoolbaraddnewrecord_link_text>Create Record</SPAN


I tried with the following locators, that did not work

 id, xpath, link, partiallink, css selector


Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Unable to click/select the SPAN id

crisslyjames
In reply to this post by swtester
Are you testing with Firefox?
If so, there is an issue with click() not working with FF and Webdriver2.35. Please see following site for more details: https://code.google.com/p/selenium/issues/detail?id=6112

From the same site, I was able to find a workaround. I added this code to launch Firefox and it worked for me:

    public class TestingInFirefox {
       
        WebDriver driver; //declare Webdriver object
        FirefoxProfile profile; //declare Firefoxprofile object
       
                //method to open Firefox browser
                public void openBrowser() {
                profile = new FirefoxProfile();
                profile.setEnableNativeEvents(false);
                driver = new FirefoxDriver(profile);

        }//end method
    }//end class

 Please note that you will have to import 'import org.openqa.selenium.firefox.FirefoxProfile' to work with the above.

Hope this helps.
Reply | Threaded
Open this post in threaded view
|

Re: Unable to click/select the SPAN id

swtester
Hi crissly,

  Appreciate your response. I am trying with IE browser since the application which i am testing mostly supports IE. Am not sure whether the profile of a browser will be the solution for this issue, but let me try an check with that and update the status.

Thank you very much
Reply | Threaded
Open this post in threaded view
|

Re: Unable to click/select the SPAN id

swtester
I tried with the profile option, that too is not working..

When i try to check with Selenium IDE to find how it locates this element, but i dont see any element or name/id, it is not showing anything..

Any other input on this...?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Unable to click/select the SPAN id

softwaretestingforum
Administrator
First of all this is not a training session question.
Moreover there is a dedicated forum to ask Selenium questions here, please use this forum to ask Selenium questions -

http://www.seleniumtests.com/p/selenium-2-forum.html
~ seleniumtests.com