This is a migrated thread and some comments may be shown as answers.

get by xpath between selenium and telerik test

3 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
AutomationTester
Top achievements
Rank 1
AutomationTester asked on 06 Feb 2017, 03:57 PM

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();

3 Answers, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 07 Feb 2017, 03:46 PM
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
 
0
AutomationTester
Top achievements
Rank 1
answered on 07 Feb 2017, 05:55 PM
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
0
Elena
Telerik team
answered on 09 Feb 2017, 02:13 PM
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
 
Tags
General Discussions
Asked by
AutomationTester
Top achievements
Rank 1
Answers by
Elena
Telerik team
AutomationTester
Top achievements
Rank 1
Share this question
or