Telerik Forums
Testing Framework Forum
3 answers
311 views

I have a scenario wherein I need to provide Authorization credentials before navigating to a webpage.
After going through the documentation provided here https://docs.telerik.com/teststudio/testing-framework/write-tests-in-code/advanced-topics-wtc/using-the-http-proxy I thought of using HttpProxy to intercept the request and inject "Authorization" header in the Request pipeline.
For some reason I am not able to see the HTTP headers that I am trying to inject. Am I doing something wrong here?

My function looks like this
public void NavigateWithCredentils(Uri navigateUrl)
{
RequestListenerInfo li = new RequestListenerInfo(AddCredentials);
Telerik.Manager.Http.AddBeforeRequestListener(li);
Telerik.ActiveBrowser.NavigateTo(navigateUrl);
Telerik.Manager.Http.RemoveBeforeRequestListener(li);
}

private void AddCredentials(object sender, HttpRequestEventArgs e)
{
if (e.Request.Headers.GetValues("Authorization") == null)
{
e.Request.Headers.Add("Authorization", "Basic realusername:realpassword");
}
}

Note: UseHttpProxy is already set to true in the Initialization code.

Ivaylo
Telerik team
 answered on 11 Apr 2018
3 answers
221 views

I have a css locator which using contains "input[id$='_btnManageEffectiveDates']" . But in testing framework I don't have any option to handle this kind of locator.

 

Elena
Telerik team
 answered on 09 Apr 2018
7 answers
736 views

Hello.

Your framework is very useful but what did you think about find elements by css selector(like WebDriver) or smth like that:

Find.ById("topPanel").Find.ByAttributes("class='buttonPanel'").Find.By.......

<div id="topPanel">
<div class="buttonPanel">
<a>Create New</a>
<a>Import</a>
<a>Create Deploy Configuration</a>
</div>
</div>

Elena
Telerik team
 answered on 06 Apr 2018
2 answers
151 views

Hi Telerik,

I have to capture memory footprint after garbage collection has been done. Is there any way we can know that garbage collection has been done?

I am seeing some memeory leaks when DOM increases. Can we force garbage collection using telerik testing framework?

Nikolay Petrov
Telerik team
 answered on 30 Mar 2018
1 answer
211 views
Hi,

Is it possible not to use specific XY coordinates when simulating a click on ScrollViewer in order to change its value? For example, clicking on the right side or left to increase or decrease the value. Can I use the ScrollToLeftEnd() or ScrollToRightEnd() methods, or are there more suitable ones?

For example, in the picture, what would be the best way to simulate the user setting the value to 1.23%?
Nikolay Petrov
Telerik team
 answered on 29 Mar 2018
1 answer
175 views

Hey there,

the application I am testing opens a new tab when the user clicks a button and in the case under test immediately closes this tab to show an inline dialog. Our test simulates the button click and waits for the dialog to appear. The test works fine in all browsers except for Microsoft Edge. In Edge, after the new tab has been opened and closed, the DOM tree reference in ActiveBrowser is null. The TestFramework Exception suggests to call RefreshDomTree() or NavigateTo() but RefreshDomTree() does have no effect and I cannot use NavigateTo() because this will cause a page refresh and the dialog is gone. Is this a know issue with Edge? Is there another way to get the DOM tree back without having to refresh the page?

Thanks for your help!

Hendrik

Nikolay Petrov
Telerik team
 answered on 27 Mar 2018
6 answers
261 views

Hi telerik,

I want to fetch the errors[any type of error, not just of javascript] from browser console. I am not seeing any way to interact with browser console window.

Please note that i am using telerik testing framework for my tests. Any way to achieve this?

Please see the screenshot.

 

 

Elena
Telerik team
 answered on 16 Mar 2018
1 answer
119 views

Hi,

I am encountering an exception while calling a method DocumentStatisticsInfo() on RadRichTextBox in framework, the exception is "object not referenced to an instance of an object", its WPF application. What could be the issue?

Regards,

Imran.

Nikolay Petrov
Telerik team
 answered on 12 Mar 2018
7 answers
256 views

Hi Telerik,

I have a scenario where i have to test an application using different browser zoom levels[75%, 125% etc.]. I am using Manager.LaunchNewBrowser() to launch a broser session but that always opened with 100% zoom. I know that 100% zoom is recommended to get correct results. But my test scenario is bit different here.
I want to launch browsers with different zoom level. I havn't found any setting to set the zoom level.

Please note that i am using telerik testing framework for my tests. I am not using test studio.

Please look into this.

 

Elena
Telerik team
 answered on 12 Mar 2018
5 answers
150 views

Hi telerik,

I am working on a test scenario where i need to verify the browser window geomatery with different quadrants[4 qudrants -+X and -+Y axis].

Basically i want to open the browser window at specified location and then captured the quadrants. After this i will again opened the browser window at the same location and captured the quadrants again. Then compare both the captured values for equality.

My questions:

1. How to launch the browser at specified location/position?

2. How to capture the quadrants?

 

Please look into this.

Vinay
Top achievements
Rank 1
 answered on 09 Mar 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?