How can we write a Descriptive Programming on Telerik.
There are cases I don't want to capture the Elements into the repository and access them into the scripts. So I would like to try with Desc Programming, Can anybody guide us how that can be achieved in Telerik.
Regards,
Dalsingh
5 Answers, 1 is accepted
I am including a link to documentation on how to write your own HTML and XAML find expressions in WebUI Test Studio. You will also want to look through our documentation on finding page elements, which I suspect will be helpful as well.
If you have any additional questions, please do not hesitate to reach out.
All the best,
Hi Daniel Levy
What are leminations of Descriptive Programming in Telerik web ui test studio?
Can you explain Descriptive Programming step by step.
I am purely tester not developer precisely using QTP in vb scripting. Please give Eg: for login page in Descriptive Programming in Telerik web ui test studio.
QTP Descriptive Programming
Set g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
g.WebEdit("name:=login").Set "aaa"
g.WebEdit("name:=passwd").SetSecure "bbb"
g.WebButton("name:=Sign In").Click
g.Link("name:=Inbox.*",
"html id:=WelcomeInboxFolderLink").Click
g.Link("name:=Sign Out").Click
QTP recorder
Browser("micclass:=Browser").page("micclass:=Page).webedit("name:=txtusername).set
xxxxxx
Browser("micclass:=Browser").page("micclass:=Page).webedit("name:=password).setsecure
xxxxxx
Browser("micclass:=Browser").page("micclass:=Page).webutton("name:=Button).click
Then to explain telerik
Hi Daniel Levy
What are leminations of Descriptive Programming in Telerik web ui test studio?
Can you explain Descriptive Programming step by step.
I am purely tester not developer precisely using QTP in vb scripting. Please give Eg: for login page in Descriptive Programming in Telerik web ui test studio.
QTP Descriptive Programming
Set
g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
g.WebEdit("name:=login").Set "aaa"
g.WebEdit("name:=passwd").SetSecure "bbb"
g.WebButton("name:=Sign In").Click
g.Link("name:=Inbox.*",
"html id:=WelcomeInboxFolderLink").Click
g.Link("name:=Sign Out").Click
QTP recorder
Browser("micclass:=Browser").page("micclass:=Page).webedit("name:=txtusername).set
xxxxxx
Browser("micclass:=Browser").page("micclass:=Page).webedit("name:=password).setsecure
xxxxxx
Browser("micclass:=Browser").page("micclass:=Page).webutton("name:=Button).click
Then to explain to telerik Descriptive Programming
to go script as step to select
c# or visual basic known that to explain in depth Descriptive Programming process
I'm not familiar with Descriptive Programming in QTP. My guess is that Test Studio's Coded Steps is what you're looking for. Check out our online documentation on this:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/coded_steps.aspx
All the best,
Stoich
the Telerik team
Register Today!
I need all commands i.e. descriptive programming for coded steps in test Studio.
Some I have figured out on my own, remaining i need.
e.g
i. To Find click and type in text box.
Element attendee_type = Find.ByXPath("//input[@id='AttendeeType1']");
ActiveBrowser.Actions.Click(attendee_type);
ActiveBrowser.Actions.SetText(attendee_type,"test1");
ii. To put static wait
System.Threading.Thread.Sleep(10000);
ii. Handle drop down
Pages.AustunPage.Dashboard_SystemClient_DropDown.SelectByText("mileage_system_client", true);
iii. To wait and verify element present
Pages.AustinPage.ProjectDetail_MileageRates_HeaderPane0.Wait.ForExists(30000);
Assert.AreEqual(true, Pages.MeetingSourceExpense2.ProjectDetail_MileageRates_HeaderPane0.IsVisible());
I want simple C# + Test Studio commands to write my coded steps.
1. Put dynamic/explicit/fluent wait on identified element
.2. Handle drop down(something like SELECT Class in selenium)- Not by recording.
3. get attribute value of identified element
4. get text of identified element
Thank you for contacting us.
Please note you are referring a forum post from over 7 years ago and as such the information in i, might not be relevant anymore. As a licensed user of Test Studio you can also submit your queries in support tickets to get assistance in a timely manner.
In regards the queries you have, I guess you will find very useful our exposed APIs documentation. In addition to that we have some samples prepared in our documentation for the listed topics. Please find details about your queries below:
1. HtmlWait class
2. Handling a drop down depends on the exact implementation. Basically you need to toggle the drop down to show the list of items to select. If the control is dynamic, the list will appear in the DOM tree and you need to locate and identify it and select the desired list element. When doing this in code only, you will need to refresh the DOM tree between the toggle and the selection of item.
3. and 4 should be covered by the Html Assert class.
I hope these will be useful for you. Though in case you need any further assistance, please do not hesitate to contact us again. Thanks.
Regards,
Elena Tsvetkova
Progress Telerik
Test Studio Trainings