Loading ...
Sorry, an error occurred while loading the content.

SpiderFixture - unknown xpath exception on IE

Expand Messages
  • blooming_ixia
    All, I have a test to go to a url, check title and login by entering login info. It works fine on firefox but when I try to run the same on IE it checks title
    Message 1 of 5 , Mar 21, 2012
    View Source
    • 0 Attachment
      All,

      I have a test to go to a url, check title and login by entering login info. It works fine on firefox but when I try to run the same on IE it checks title correctly and fails to enter login info. I get exception - Unknown xpath (Unable to find element with xpath == //input[@id='login']).

      Please suggest how the exception can be overcome. Any help would be appreciated.

      Thanks in advance.
    • Darren Rowley
      Your xpath looks fine to me I assume the == is not part of it. What happens if you take the xpath away and just use login on it s own as the locator. You don t
      Message 2 of 5 , Mar 28, 2012
      View Source
      • 0 Attachment
        Your xpath looks fine to me I assume the == is not part of it.

        What happens if you take the xpath away and just use

        login

        on it's own as the locator. You don't need an xpath when there is an id present.

        Do you have a link to the page you are trying to hit?

        d.


        --- In fitnesse@yahoogroups.com, "blooming_ixia" <blooming_ixia@...> wrote:
        >
        > All,
        >
        > I have a test to go to a url, check title and login by entering login info. It works fine on firefox but when I try to run the same on IE it checks title correctly and fails to enter login info. I get exception - Unknown xpath (Unable to find element with xpath == //input[@id='login']).
        >
        > Please suggest how the exception can be overcome. Any help would be appreciated.
        >
        > Thanks in advance.
        >
      • blooming_ixia
        Hi Darren, I just used login instead of xpath and it worked fine. I am now able to login but i am getting similar error when selecting a radio button. It does
        Message 3 of 5 , Mar 29, 2012
        View Source
        • 0 Attachment
          Hi Darren,

          I just used login instead of xpath and it worked fine. I am now able to login but i am getting similar error when selecting a radio button. It does not have any id. It works on IE8 but now on IE9. But in general do you have any suggestions on how to handle such xpath errors for elements which does not have any id.

          |with|//input[@value='field' and @name='fieldType' and @type='radio']|select|true|


          Thanks for your help!!

          --- In fitnesse@yahoogroups.com, "Darren Rowley" <rowleydm@...> wrote:
          >
          > Your xpath looks fine to me I assume the == is not part of it.
          >
          > What happens if you take the xpath away and just use
          >
          > login
          >
          > on it's own as the locator. You don't need an xpath when there is an id present.
          >
          > Do you have a link to the page you are trying to hit?
          >
          > d.
          >
          >
          > --- In fitnesse@yahoogroups.com, "blooming_ixia" <blooming_ixia@> wrote:
          > >
          > > All,
          > >
          > > I have a test to go to a url, check title and login by entering login info. It works fine on firefox but when I try to run the same on IE it checks title correctly and fails to enter login info. I get exception - Unknown xpath (Unable to find element with xpath == //input[@id='login']).
          > >
          > > Please suggest how the exception can be overcome. Any help would be appreciated.
          > >
          > > Thanks in advance.
          > >
          >
        • Darren Rowley
          Hmm sorry but I don t really know what to suggest, your xpath and the way you re using it on SpiderFixture looks fine. XPATH does work fine with IE and the
          Message 4 of 5 , Apr 4 1:17 PM
          View Source
          • 0 Attachment
            Hmm sorry but I don't really know what to suggest, your xpath and the way you're using it on SpiderFixture looks fine. XPATH does work fine with IE and the xpath / locator internal specifications all pass.

            That said I rarely use Internet Explorer and I do know Seleniums xpath engine in IE is not native to the browser. I suggest you take a look the selenium-user or Webdriver forums to search for xpath issues with Selenium and IE and also how to maybe debug xpath issues in IE. In Firefox it's a peice of cake with FireBug and the various XPather style plugins.

            darren.

            --- In fitnesse@yahoogroups.com, "blooming_ixia" <blooming_ixia@...> wrote:
            >
            >
            > Hi Darren,
            >
            > I just used login instead of xpath and it worked fine. I am now able to login but i am getting similar error when selecting a radio button. It does not have any id. It works on IE8 but now on IE9. But in general do you have any suggestions on how to handle such xpath errors for elements which does not have any id.
            >
            > |with|//input[@value='field' and @name='fieldType' and @type='radio']|select|true|
            >
            >
            > Thanks for your help!!
            >
            > --- In fitnesse@yahoogroups.com, "Darren Rowley" <rowleydm@> wrote:
            > >
            > > Your xpath looks fine to me I assume the == is not part of it.
            > >
            > > What happens if you take the xpath away and just use
            > >
            > > login
            > >
            > > on it's own as the locator. You don't need an xpath when there is an id present.
            > >
            > > Do you have a link to the page you are trying to hit?
            > >
            > > d.
            > >
            > >
            > > --- In fitnesse@yahoogroups.com, "blooming_ixia" <blooming_ixia@> wrote:
            > > >
            > > > All,
            > > >
            > > > I have a test to go to a url, check title and login by entering login info. It works fine on firefox but when I try to run the same on IE it checks title correctly and fails to enter login info. I get exception - Unknown xpath (Unable to find element with xpath == //input[@id='login']).
            > > >
            > > > Please suggest how the exception can be overcome. Any help would be appreciated.
            > > >
            > > > Thanks in advance.
            > > >
            > >
            >
          • blooming_ixia
            I will check that out. Thank you, Darren.
            Message 5 of 5 , Apr 6 9:57 AM
            View Source
            • 0 Attachment
              I will check that out. Thank you, Darren.

              --- In fitnesse@yahoogroups.com, "Darren Rowley" <rowleydm@...> wrote:
              >
              > Hmm sorry but I don't really know what to suggest, your xpath and the way you're using it on SpiderFixture looks fine. XPATH does work fine with IE and the xpath / locator internal specifications all pass.
              >
              > That said I rarely use Internet Explorer and I do know Seleniums xpath engine in IE is not native to the browser. I suggest you take a look the selenium-user or Webdriver forums to search for xpath issues with Selenium and IE and also how to maybe debug xpath issues in IE. In Firefox it's a peice of cake with FireBug and the various XPather style plugins.
              >
              > darren.
              >
              > --- In fitnesse@yahoogroups.com, "blooming_ixia" <blooming_ixia@> wrote:
              > >
              > >
              > > Hi Darren,
              > >
              > > I just used login instead of xpath and it worked fine. I am now able to login but i am getting similar error when selecting a radio button. It does not have any id. It works on IE8 but now on IE9. But in general do you have any suggestions on how to handle such xpath errors for elements which does not have any id.
              > >
              > > |with|//input[@value='field' and @name='fieldType' and @type='radio']|select|true|
              > >
              > >
              > > Thanks for your help!!
              > >
              > > --- In fitnesse@yahoogroups.com, "Darren Rowley" <rowleydm@> wrote:
              > > >
              > > > Your xpath looks fine to me I assume the == is not part of it.
              > > >
              > > > What happens if you take the xpath away and just use
              > > >
              > > > login
              > > >
              > > > on it's own as the locator. You don't need an xpath when there is an id present.
              > > >
              > > > Do you have a link to the page you are trying to hit?
              > > >
              > > > d.
              > > >
              > > >
              > > > --- In fitnesse@yahoogroups.com, "blooming_ixia" <blooming_ixia@> wrote:
              > > > >
              > > > > All,
              > > > >
              > > > > I have a test to go to a url, check title and login by entering login info. It works fine on firefox but when I try to run the same on IE it checks title correctly and fails to enter login info. I get exception - Unknown xpath (Unable to find element with xpath == //input[@id='login']).
              > > > >
              > > > > Please suggest how the exception can be overcome. Any help would be appreciated.
              > > > >
              > > > > Thanks in advance.
              > > > >
              > > >
              > >
              >
            Your message has been successfully submitted and would be delivered to recipients shortly.