This question is locked. New answers and comments are not allowed.
Hugues Ferland
Top achievements
Rank 1
Hugues Ferland
asked on 04 Oct 2010, 04:59 PM
Hi,
I'm currently setting up a small framework/layer to manage environment switching, ensuring that any change we do, say in Dev, will still be ok in Acceptance, Preprod, Prod, etc. Everything working except for cases where we use a FrameRadWindow popup. I found out the frame information is stored in a property named FrameInfo but I cannot find how to programmatically change this property. I need to change the 'src' and the 'BaseUrl' properties because the base folder varies depending of the current environment. How can I do that ?
Regards,
Martin L.
I'm currently setting up a small framework/layer to manage environment switching, ensuring that any change we do, say in Dev, will still be ok in Acceptance, Preprod, Prod, etc. Everything working except for cases where we use a FrameRadWindow popup. I found out the frame information is stored in a property named FrameInfo but I cannot find how to programmatically change this property. I need to change the 'src' and the 'BaseUrl' properties because the base folder varies depending of the current environment. How can I do that ?
Regards,
Martin L.
6 Answers, 1 is accepted
0
Hello Pascal Guy,
The Src property really can't be modified programmatically. Can you somehow modify the FrameInfo so it doesn't rely on the src attribute? Kind regards,
Cody
The framework will automatically override the BaseURL property of frames with the Base URL setting of from the File Paths tab of the that's contained in the test settings. See the attached screenshot. It can also be set programmatically like this:
Manager.Settings.BaseUrl =
"http://demos.telerik.com"
;
The Src property really can't be modified programmatically. Can you somehow modify the FrameInfo so it doesn't rely on the src attribute? Kind regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Hugues Ferland
Top achievements
Rank 1
answered on 05 Oct 2010, 04:55 PM
Hi,
I tried using the suggested solution like so in the coded step with a Frame element :
Unfortunately, the test runner doesn't seem to take account the baseUrl I am setting and the request times out without finding the element I am looking for.
The objective I am trying to achieve here is changing the test environment url. This must be a very common issue I am sure there must be some cleaner way to do it. Here's a little bit more info on our setup so you can understand better. One thing you must know is the difference between two test environments can be the Website folder.
Example :
Dev env : http://localhost/MyTestWebsite/content/home.aspx
Acceptance env : http://acceptance.mycompany.net/content/home.aspx
Prod env : https://www.mycompany.net/content/home.aspx
In the Element Explorer, I can see the frames used for my RadWindows. The FrameInfo BaseUrl property is harcoded with /MyTestWebsite/content/home.aspx. I want to make sure I create tests that can be executed against any of these environments.
Hope this is a little clearer,
Cheers,
Martin L.
I tried using the suggested solution like so in the coded step with a Frame element :
// Set the popup url
Manager.Settings.BaseUrl =
"/MyWebsite/Content/Unit/BatchAssignment/MusicInstrumentBatchAssignation.aspx"
;
// RadGridDataItem: check box click item '0' selection.
Pages.MusicInstrumentView.FrameRadWindowCadetList.TableCell.ClientSelectCheckBoxClick();
// Set back the BaseUrl to old value;
Manager.Settings.BaseUrl = m_OldBaseUrl;
Unfortunately, the test runner doesn't seem to take account the baseUrl I am setting and the request times out without finding the element I am looking for.
The objective I am trying to achieve here is changing the test environment url. This must be a very common issue I am sure there must be some cleaner way to do it. Here's a little bit more info on our setup so you can understand better. One thing you must know is the difference between two test environments can be the Website folder.
Example :
Dev env : http://localhost/MyTestWebsite/content/home.aspx
Acceptance env : http://acceptance.mycompany.net/content/home.aspx
Prod env : https://www.mycompany.net/content/home.aspx
In the Element Explorer, I can see the frames used for my RadWindows. The FrameInfo BaseUrl property is harcoded with /MyTestWebsite/content/home.aspx. I want to make sure I create tests that can be executed against any of these environments.
Hope this is a little clearer,
Cheers,
Martin L.
0
Accepted
Hello Pascal Guy,
Cody
I think there's a MUCH easier way and you don't even have to resort to code. In the FrameInfo properties you can use a "partial match" by preceeding the BaseURL with a ~ as shown in the attached screenshot. The ~ means match a URL that contains the specified text anywhere in the entire URL.
All the best,Cody
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items
0
Hugues Ferland
Top achievements
Rank 1
answered on 07 Oct 2010, 02:21 PM
Thanks, that's perfect !
0
dan
Top achievements
Rank 1
answered on 27 Jul 2016, 11:04 AM
Hi Cody,
Can the FrameInfo src property be partially matched using ~, as well?
thx,
dan
0
Hello Dan,
Yes it can be be partially matched using ~.
Let us know if you need further assistance.
Regards,
Boyan Boev
Telerik by Progress
Yes it can be be partially matched using ~.
Let us know if you need further assistance.
Regards,
Boyan Boev
Telerik by Progress
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Test Studio Trainings