get by xpath between selenium and telerik test

4 posts, 0 answers
  1. AutomationTester
    AutomationTester avatar
    2 posts
    Member since:
    Jan 2015

    Posted 06 Feb 2017 Link to this post

    I am trying to click a menu items in a span as attached in a screenshot. The same below code to find an item by XPath works in selenium but not in telerik testing framework. Can some one tell me why?

    --Telerik Code that does not work. Gives null menu.

      Element menu = myManager.ActiveBrowser.Find.ByXPath("//span[contains(text(),'some text')]");

    myManager.ActiveBrowser.Actions.Click(menu);

    ---Selenium code that works. 

    driver.FindElement(By.XPath("//span[contains(text(),'some text')]")).Click();

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 07 Feb 2017 Link to this post

    Hello Ujjwal,

    Telerik Testing Framework is not relying on Xpaths. Moreover we do not recommend using Xpath since it could get changed with every app update. Telerik Testing Framework uses an intelligent  element identification scheme to locate the elements.

    Here you could find further details about find expressions. I guess the following article will be useful for your reference as well. 

    I hope the above information will help you to find the most appropriate approach to design your Telerik tests. Thanks! 

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. AutomationTester
    AutomationTester avatar
    2 posts
    Member since:
    Jan 2015

    Posted 07 Feb 2017 in reply to Elena Tsvetkova Link to this post

    Hi Elena, Thanks for your reply. We are using Ext-JS and I am wondering if there is an specific resources that you can point to that can helpful while we are now starting to experiment withTelerika testing framework with Sencha Ext-JS
  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 09 Feb 2017 Link to this post

    Hi Ujjwal,

    I am not familiar with Sencha Ext-JS and could not provide any useful details. However I am sure you will find the best approach for your requirements!  

    Regards,
    Elena Tsvetkova
    Telerik by Progress
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top