Hi,
I am trying to build a test case round the account entity with the following steps in dynamic crm 2011
1.create new account
2.save account
3.create a activity of type task for the created account
I am able to achieve till 2 for 3, however i am able to open the task as a seperate window (modal ie) and the foucs is diapled to the desired text feild(by default) however i am not able to acess the ribbions of the new window
The Active browser has the values of the old account browser and not the new task browser
Any help appriciated...
Thanks,
Saket
I am trying to build a test case round the account entity with the following steps in dynamic crm 2011
1.create new account
2.save account
3.create a activity of type task for the created account
I am able to achieve till 2 for 3, however i am able to open the task as a seperate window (modal ie) and the foucs is diapled to the desired text feild(by default) however i am not able to acess the ribbions of the new window
The Active browser has the values of the old account browser and not the new task browser
Any help appriciated...
Thanks,
Saket
4 Answers, 1 is accepted
0
Hello Saket,
IE Modal dialogs require special handling. Please see this page for more information and reference this sample code:
Regards,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
IE Modal dialogs require special handling. Please see this page for more information and reference this sample code:
Manager.LaunchNewBrowser();
ActiveBrowser.NavigateTo(
"http://www.codestore.net/store.nsf/unid/DOMM-4R5MDQ"
);
ActiveBrowser.Window.SetFocus();
HtmlAnchor a = Find.ByContent<HtmlAnchor>(
"this link"
);
a.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop);
a.MouseClick();
System.Threading.Thread.Sleep(1000);
// Connect to modal pop-up window : A Modal Pop-Up -- Webpage Dialog
if
((ActiveBrowser.BrowserType == BrowserType.InternetExplorer))
{
ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions ieActions = ((ArtOfTest.WebAii.BrowserSpecialized.InternetExplorer.InternetExplorerActions)(ActiveBrowser.Actions));
ieActions.ConnectIEDialog(
"A Modal Pop-Up -- Webpage Dialog"
, 5000);
}
Manager.WaitForNewBrowserConnect(
"http://www.codestore.net/store.nsf/unid/9F0D8552077A408686256999005AC70D/$file/simple.html"
,
true
, 5000);
Manager.ActiveBrowser.WaitUntilReady();
Log.WriteLine(Manager.ActiveBrowser.PageTitle);
Find.ByContent<HtmlDiv>(
"This is in a modal dialogue. Use the X button to return to the main window."
).MouseClick();
ActiveBrowser.Close();
Regards,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Saket
Top achievements
Rank 1
answered on 20 Sep 2011, 10:22 AM
Thanks Anthony,
The issue is that i tried using the same snippet provided howeverer the url that needs to be connected is generated as the "account url" + a guid that is generated at runtime.
Basically i cannoy write the url name to connect, also the browsers.count is always 1
Thanks
The issue is that i tried using the same snippet provided howeverer the url that needs to be connected is generated as the "account url" + a guid that is generated at runtime.
Basically i cannoy write the url name to connect, also the browsers.count is always 1
Thanks
0
Hello Saket,
In the following line of code, the second argument designates whether the URL is partial.
When set to "true", you can omit the dynamic portion from the URL and simply include the static portion that is unique to your modal pop-up. Once you properly connect to the modal pop-up, you can access its elements.
All the best,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
In the following line of code, the second argument designates whether the URL is partial.
Manager.WaitForNewBrowserConnect(
"http://www.codestore.net/store.nsf/unid/9F0D8552077A408686256999005AC70D/$file/simple.html"
,
true
, 5000);
When set to "true", you can omit the dynamic portion from the URL and simply include the static portion that is unique to your modal pop-up. Once you properly connect to the modal pop-up, you can access its elements.
All the best,
Anthony
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Saket
Top achievements
Rank 1
answered on 22 Sep 2011, 04:45 AM
Thanks Anthony..
That was great help..
I have also posted one more thread question regarding the comarision between use of web aii with Visual Studio test suite and CodedUI.. can you also please look in the same.
I am actually looking to point that can be convincible
FYI.. these test are for Dynamic CRM 2011
Thanks,
Saket
That was great help..
I have also posted one more thread question regarding the comarision between use of web aii with Visual Studio test suite and CodedUI.. can you also please look in the same.
I am actually looking to point that can be convincible
FYI.. these test are for Dynamic CRM 2011
Thanks,
Saket