Telerik Forums
Test Studio Forum
1 answer
316 views

I'm trying to grab the current url during a test and append some text on the end of it, to navigate to a certain page.

For context, we have both a production and debug server. I figured it would be easier instead of toggling between the debug/prod urls in a NavigateTo step (which would also defeat the purpose of continuous integration because we would have to manually change it).

However, what I came up with, I'm getting a compiler error:

...tstest.cs(56,33) : error CS0103: The name 'HttpContext' does not exist in the current context

The namespace that is supposed to be used according to Microsoft is System.Web. 

This is the code block that I'm using:

                  string currentUrl = HttpContext.Current.Request.Url.AbsoluteUri;
            
       //Append the /share to the url
       string urlWeWant = currentUrl + "/share";
            
       //Navigate to the url
       ActiveBrowser.NavigateTo(urlWeWant);
Elena
Telerik team
 answered on 09 Nov 2018
3 answers
77 views

We are facing issue in Edge browser that in one particular step click event is getting performed always 40 pixel above the element. It is working fine in Internet Explorer, Firefox and Chrome.

It's a web application developed in HTML5.
I tried with Desktop command click and Simple Click also.

Can anyone let me know what is creating the problem or where we are making the mistake?

Thanks and Regards,

Sumit Kumar

Elena
Telerik team
 answered on 07 Nov 2018
4 answers
168 views

As the title says, I've been trying to sift through a DOM that has a bunch of "inbox" messages that are all lined up in a div. I've been trying just to grab the first inbox message's div and get it's id value and set it as an extracted value. Once I click on the message, and and come back to the page, it no longer is marked as "unread" and I want to grab that same id again to compare. (these messages are sorted by most recent, so it will always be the first message.)

You can see in the code block below that the unread messages are marked with a specific class, which lets me grab the first message. I also tried grabbing it as an element type (not using the <HtmlDiv>), and getting the ID via that way, it also didn't work.

Since these messages all have unique, generated ids based on their content, I haven't been able to work out a way to extract and compare them. Let me know if you need anything else from me, and I appreciate the help.

[CodedStep(@"Extract id of first new inbox message")]
public void extractFirstNewInboxMessage()
{
    HtmlDiv firstMessageElement = ActiveBrowser.Find.ByAttributes<HtmlDiv>("class= row message unread");
    string id = firstMessageElement.ID;
    SetExtractedValue("firstNewMessageElementID", id);
}
 
[CodedStep(@"Extract id of first inbox message")]
public void extractFirstOldInboxMessage()
{
    HtmlDiv firstMessageElement = ActiveBrowser.Find.ByAttributes<HtmlDiv>("class= row message");
    SetExtractedValue("firstOldMessageElementID", firstMessageElement.ID);
}
 
[CodedStep(@"compare extracted inbox messages")]
public void compareInboxMessage()
{
    string newMessage = GetExtractedValue("firstNewMessageElementID").ToString();
    string oldMessage = GetExtractedValue("firstOldMessageElementID").ToString;
     
    //bool value
    bool a = false;
     
    if (newMessage == oldMessage)
    {
        a = true;
    }
    Assert.IsTrue(a);
}
Elena
Telerik team
 answered on 06 Nov 2018
3 answers
123 views
Hi,                                                                                                                                                                                                                                                               I am not able to copy passed test case under project. If I copy passed test case under project and execute test case build gets failed                                                                                           eg:- attached screenshot
Elena
Telerik team
 answered on 06 Nov 2018
5 answers
167 views

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
Elena
Telerik team
 answered on 06 Nov 2018
3 answers
135 views

Need to verify or confirm the field is displayed with * in the field name 

thanks 

Etl
Top achievements
Rank 1
 answered on 02 Nov 2018
1 answer
122 views
I have installed Jira Service 3.2.2 and Jira Core 7.2.2.
Whenever I create a new incidence in my project, an email is sent to the user. That email is sent in Spanish and I just want to change a sentence from that email.
I've found some translations in the file
\jira\plugins\installed-plugins\jira-servicedesk-application-3.2.2.jar
in \i18 folder.
I've changed there the wrong sentence and restarted JIRA but the email is still the original, changes seem to not be applied.
Is it the wrong location for email templates translations?
Elena
Telerik team
 answered on 01 Nov 2018
4 answers
100 views

Hi Admin,

 

I have problem about ExtraNoteText that it not keep input value. Testing not fail but value not show.

Please see those steps via attach files.

 

Thank you,

Nut

 

Daniel Djambov
Telerik team
 answered on 01 Nov 2018
4 answers
103 views

Hi

I receive the error "System.NullReferenceException: Object reference not set to an instance of an object." on a coded step that logs a user out of web application in step 5, and then waits until the "thank you" text is displayed on the subsequent page until continuing with the script. The error is thrown on line 8. I construct the ThankYouSignOut object in line 7 almost exactly the same as the SignOutLink in step 2, so I'm at a loss as to why it's passing on step 2-5, but failing on 8. Any help would be appreciated!

 

1.ActiveBrowser.Window.SetFocus
2.Dim SignOutLink AS HtmlAnchor = ActiveBrowser.Find.ByExpression(Of HtmlAnchor)(new HtmlFindExpression("tagname=a", "href=~logout"))
3.SignOutLink.Wait.ForExists(30000)
4.SignOutLink.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
5.SignOutLink.MouseClick
6.ActiveBrowser.Window.SetFocus
7.Dim ThankYouSignOut AS HtmlControl = ActiveBrowser.Find.ByExpression(Of HtmlControl)(new HtmlFindExpression("tagname=p","TextContent=^Thank you for using"))
8.ThankYouSignOut.Wait.ForExists(30000)

 

Daniel Djambov
Telerik team
 answered on 01 Nov 2018
1 answer
99 views

Hi,

I have some questions related to Mobile app automation in telerik test studio:

1. How can you access the code behind the automatically created test steps?

2. how can I add a xpath to an element? i basically want to identify the element using xpath.  It seems that I can access the element properties(query builder), and there is a "+" to add new properties. How can i generate a xpath automatically? 

3. How can I reuse the elements in my previous test case? Currently, It seems that it creating a the same element again and again in every test case. please look in to the attached pic. This is a really big issue because in case if the developer changes the element information, I will have to go in to each test cases and update it. 

4.How can I reuse test cases?

 

 

Elena
Telerik team
 answered on 24 Oct 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?