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.
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.

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>
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?
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
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.

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.
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.

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.