Advertisement
Guest User

Untitled

a guest
Nov 9th, 2015
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.49 KB | None | 0 0
  1. // ------------------------------------------------------------------------------
  2. // <auto-generated>
  3. // This code was generated by coded UI test builder.
  4. // Version: 14.0.0.0
  5. //
  6. // Changes to this file may cause incorrect behavior and will be lost if
  7. // the code is regenerated.
  8. // </auto-generated>
  9. // ------------------------------------------------------------------------------
  10.  
  11. namespace CodedUITestProject1
  12. {
  13. using System;
  14. using System.CodeDom.Compiler;
  15. using System.Collections.Generic;
  16. using System.Drawing;
  17. using System.Text.RegularExpressions;
  18. using System.Windows.Input;
  19. using Microsoft.VisualStudio.TestTools.UITest.Extension;
  20. using Microsoft.VisualStudio.TestTools.UITesting;
  21. using Microsoft.VisualStudio.TestTools.UITesting.WinControls;
  22. using Microsoft.VisualStudio.TestTools.UnitTesting;
  23. using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;
  24. using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;
  25. using MouseButtons = System.Windows.Forms.MouseButtons;
  26.  
  27.  
  28. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  29. public partial class UIMap
  30. {
  31.  
  32. /// <summary>
  33. /// RecordedMethod1 - Use 'RecordedMethod1Params' to pass parameters into this method.
  34. /// </summary>
  35. public void RecordedMethod1()
  36. {
  37. #region Variable Declarations
  38. WinButton uINewEmailButton = this.UIInboxoutlooktest01yeWindow.UIItemWindow.UINewToolBar.UINewEmailButton;
  39. WinEdit uITOEdit = this.UIUntitledMessageHTMLWindow.UIItemWindow.UITOEdit;
  40. WinEdit uICCEdit = this.UIUntitledMessageHTMLWindow.UIItemWindow1.UICCEdit;
  41. WinEdit uISubjectEdit = this.UIUntitledMessageHTMLWindow.UIItemWindow2.UISubjectEdit;
  42. WinClient uIMessageClient = this.UIUntitledMessageHTMLWindow.UIDocument1Window.UIDocument1Client.UIMessageClient;
  43. WinButton uISendButton = this.UIUntitledMessageHTMLWindow.UISendWindow.UISendButton;
  44. #endregion
  45.  
  46. // Launch '%ProgramFiles%\Microsoft Office\Office14\OUTLOOK.EXE'
  47. ApplicationUnderTest oUTLOOKApplication = ApplicationUnderTest.Launch(this.RecordedMethod1Params.ExePath, this.RecordedMethod1Params.AlternateExePath);
  48.  
  49. // Click 'New E-mail' button
  50. Mouse.Click(uINewEmailButton, new Point(13, 37));
  51.  
  52. // Type 'someone@examples.com' in 'To' text box
  53. uITOEdit.Text = this.RecordedMethod1Params.UITOEditText;
  54.  
  55. // Type '{Tab}' in 'To' text box
  56. Keyboard.SendKeys(uITOEdit, this.RecordedMethod1Params.UITOEditSendKeys, ModifierKeys.None);
  57.  
  58. // Type '{Tab}' in 'Cc' text box
  59. Keyboard.SendKeys(uICCEdit, this.RecordedMethod1Params.UICCEditSendKeys, ModifierKeys.None);
  60.  
  61. // Type 'hi' in 'Subject:' text box
  62. uISubjectEdit.Text = this.RecordedMethod1Params.UISubjectEditText;
  63.  
  64. // Type 'hlo' in 'Message' client
  65. Keyboard.SendKeys(uIMessageClient, this.RecordedMethod1Params.UIMessageClientSendKeys, ModifierKeys.None);
  66.  
  67. // Click '&Send' button
  68. Mouse.Click(uISendButton, new Point(29, 65));
  69. }
  70.  
  71. #region Properties
  72. public virtual RecordedMethod1Params RecordedMethod1Params
  73. {
  74. get
  75. {
  76. if ((this.mRecordedMethod1Params == null))
  77. {
  78. this.mRecordedMethod1Params = new RecordedMethod1Params();
  79. }
  80. return this.mRecordedMethod1Params;
  81. }
  82. }
  83.  
  84. public UIInboxoutlooktest01yeWindow UIInboxoutlooktest01yeWindow
  85. {
  86. get
  87. {
  88. if ((this.mUIInboxoutlooktest01yeWindow == null))
  89. {
  90. this.mUIInboxoutlooktest01yeWindow = new UIInboxoutlooktest01yeWindow();
  91. }
  92. return this.mUIInboxoutlooktest01yeWindow;
  93. }
  94. }
  95.  
  96. public UIUntitledMessageHTMLWindow UIUntitledMessageHTMLWindow
  97. {
  98. get
  99. {
  100. if ((this.mUIUntitledMessageHTMLWindow == null))
  101. {
  102. this.mUIUntitledMessageHTMLWindow = new UIUntitledMessageHTMLWindow();
  103. }
  104. return this.mUIUntitledMessageHTMLWindow;
  105. }
  106. }
  107. #endregion
  108.  
  109. #region Fields
  110. private RecordedMethod1Params mRecordedMethod1Params;
  111.  
  112. private UIInboxoutlooktest01yeWindow mUIInboxoutlooktest01yeWindow;
  113.  
  114. private UIUntitledMessageHTMLWindow mUIUntitledMessageHTMLWindow;
  115. #endregion
  116. }
  117.  
  118. /// <summary>
  119. /// Parameters to be passed into 'RecordedMethod1'
  120. /// </summary>
  121. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  122. public class RecordedMethod1Params
  123. {
  124.  
  125. #region Fields
  126. /// <summary>
  127. /// Launch '%ProgramFiles%\Microsoft Office\Office14\OUTLOOK.EXE'
  128. /// </summary>
  129. public string ExePath = "C:\\Program Files (x86)\\Microsoft Office\\Office14\\OUTLOOK.EXE";
  130.  
  131. /// <summary>
  132. /// Launch '%ProgramFiles%\Microsoft Office\Office14\OUTLOOK.EXE'
  133. /// </summary>
  134. public string AlternateExePath = "%ProgramFiles%\\Microsoft Office\\Office14\\OUTLOOK.EXE";
  135.  
  136. /// <summary>
  137. /// Type 'someone@examples.com' in 'To' text box
  138. /// </summary>
  139. public string UITOEditText = "someone@examples.com";
  140.  
  141. /// <summary>
  142. /// Type '{Tab}' in 'To' text box
  143. /// </summary>
  144. public string UITOEditSendKeys = "{Tab}";
  145.  
  146. /// <summary>
  147. /// Type '{Tab}' in 'Cc' text box
  148. /// </summary>
  149. public string UICCEditSendKeys = "{Tab}";
  150.  
  151. /// <summary>
  152. /// Type 'hi' in 'Subject:' text box
  153. /// </summary>
  154. public string UISubjectEditText = "hi";
  155.  
  156. /// <summary>
  157. /// Type 'hlo' in 'Message' client
  158. /// </summary>
  159. public string UIMessageClientSendKeys = "hlo";
  160. #endregion
  161. }
  162.  
  163. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  164. public class UIInboxoutlooktest01yeWindow : WinWindow
  165. {
  166.  
  167. public UIInboxoutlooktest01yeWindow()
  168. {
  169. #region Search Criteria
  170. this.SearchProperties[WinWindow.PropertyNames.Name] = "Inbox - outlooktest01@yesware.com - Microsoft Outlook";
  171. this.SearchProperties[WinWindow.PropertyNames.ClassName] = "rctrl_renwnd32";
  172. this.WindowTitles.Add("Inbox - outlooktest01@yesware.com - Microsoft Outlook");
  173. #endregion
  174. }
  175.  
  176. #region Properties
  177. public UIItemWindow UIItemWindow
  178. {
  179. get
  180. {
  181. if ((this.mUIItemWindow == null))
  182. {
  183. this.mUIItemWindow = new UIItemWindow(this);
  184. }
  185. return this.mUIItemWindow;
  186. }
  187. }
  188. #endregion
  189.  
  190. #region Fields
  191. private UIItemWindow mUIItemWindow;
  192. #endregion
  193. }
  194.  
  195. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  196. public class UIItemWindow : WinWindow
  197. {
  198.  
  199. public UIItemWindow(UITestControl searchLimitContainer) :
  200. base(searchLimitContainer)
  201. {
  202. #region Search Criteria
  203. this.SearchProperties[WinWindow.PropertyNames.AccessibleName] = "Ribbon";
  204. this.SearchProperties[WinWindow.PropertyNames.ClassName] = "NetUIHWND";
  205. this.WindowTitles.Add("Inbox - outlooktest01@yesware.com - Microsoft Outlook");
  206. #endregion
  207. }
  208.  
  209. #region Properties
  210. public UINewToolBar UINewToolBar
  211. {
  212. get
  213. {
  214. if ((this.mUINewToolBar == null))
  215. {
  216. this.mUINewToolBar = new UINewToolBar(this);
  217. }
  218. return this.mUINewToolBar;
  219. }
  220. }
  221. #endregion
  222.  
  223. #region Fields
  224. private UINewToolBar mUINewToolBar;
  225. #endregion
  226. }
  227.  
  228. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  229. public class UINewToolBar : WinToolBar
  230. {
  231.  
  232. public UINewToolBar(UITestControl searchLimitContainer) :
  233. base(searchLimitContainer)
  234. {
  235. #region Search Criteria
  236. this.SearchProperties[WinToolBar.PropertyNames.Name] = "New";
  237. this.WindowTitles.Add("Inbox - outlooktest01@yesware.com - Microsoft Outlook");
  238. #endregion
  239. }
  240.  
  241. #region Properties
  242. public WinButton UINewEmailButton
  243. {
  244. get
  245. {
  246. if ((this.mUINewEmailButton == null))
  247. {
  248. this.mUINewEmailButton = new WinButton(this);
  249. #region Search Criteria
  250. this.mUINewEmailButton.SearchProperties[WinButton.PropertyNames.Name] = "New E-mail";
  251. this.mUINewEmailButton.WindowTitles.Add("Inbox - outlooktest01@yesware.com - Microsoft Outlook");
  252. #endregion
  253. }
  254. return this.mUINewEmailButton;
  255. }
  256. }
  257. #endregion
  258.  
  259. #region Fields
  260. private WinButton mUINewEmailButton;
  261. #endregion
  262. }
  263.  
  264. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  265. public class UIUntitledMessageHTMLWindow : WinWindow
  266. {
  267.  
  268. public UIUntitledMessageHTMLWindow()
  269. {
  270. #region Search Criteria
  271. this.SearchProperties[WinWindow.PropertyNames.Name] = "Untitled - Message (HTML) ";
  272. this.SearchProperties[WinWindow.PropertyNames.ClassName] = "rctrl_renwnd32";
  273. this.WindowTitles.Add("Untitled - Message (HTML) ");
  274. this.WindowTitles.Add("hi - Message (HTML) ");
  275. #endregion
  276. }
  277.  
  278. #region Properties
  279. public UIItemWindow1 UIItemWindow
  280. {
  281. get
  282. {
  283. if ((this.mUIItemWindow == null))
  284. {
  285. this.mUIItemWindow = new UIItemWindow1(this);
  286. }
  287. return this.mUIItemWindow;
  288. }
  289. }
  290.  
  291. public UIItemWindow11 UIItemWindow1
  292. {
  293. get
  294. {
  295. if ((this.mUIItemWindow1 == null))
  296. {
  297. this.mUIItemWindow1 = new UIItemWindow11(this);
  298. }
  299. return this.mUIItemWindow1;
  300. }
  301. }
  302.  
  303. public UIItemWindow2 UIItemWindow2
  304. {
  305. get
  306. {
  307. if ((this.mUIItemWindow2 == null))
  308. {
  309. this.mUIItemWindow2 = new UIItemWindow2(this);
  310. }
  311. return this.mUIItemWindow2;
  312. }
  313. }
  314.  
  315. public UIDocument1Window UIDocument1Window
  316. {
  317. get
  318. {
  319. if ((this.mUIDocument1Window == null))
  320. {
  321. this.mUIDocument1Window = new UIDocument1Window(this);
  322. }
  323. return this.mUIDocument1Window;
  324. }
  325. }
  326.  
  327. public UISendWindow UISendWindow
  328. {
  329. get
  330. {
  331. if ((this.mUISendWindow == null))
  332. {
  333. this.mUISendWindow = new UISendWindow(this);
  334. }
  335. return this.mUISendWindow;
  336. }
  337. }
  338. #endregion
  339.  
  340. #region Fields
  341. private UIItemWindow1 mUIItemWindow;
  342.  
  343. private UIItemWindow11 mUIItemWindow1;
  344.  
  345. private UIItemWindow2 mUIItemWindow2;
  346.  
  347. private UIDocument1Window mUIDocument1Window;
  348.  
  349. private UISendWindow mUISendWindow;
  350. #endregion
  351. }
  352.  
  353. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  354. public class UIItemWindow1 : WinWindow
  355. {
  356.  
  357. public UIItemWindow1(UITestControl searchLimitContainer) :
  358. base(searchLimitContainer)
  359. {
  360. #region Search Criteria
  361. this.SearchProperties[WinWindow.PropertyNames.ControlId] = "4099";
  362. this.WindowTitles.Add("Untitled - Message (HTML) ");
  363. #endregion
  364. }
  365.  
  366. #region Properties
  367. public WinEdit UITOEdit
  368. {
  369. get
  370. {
  371. if ((this.mUITOEdit == null))
  372. {
  373. this.mUITOEdit = new WinEdit(this);
  374. #region Search Criteria
  375. this.mUITOEdit.SearchProperties[WinEdit.PropertyNames.Name] = "To";
  376. this.mUITOEdit.WindowTitles.Add("Untitled - Message (HTML) ");
  377. #endregion
  378. }
  379. return this.mUITOEdit;
  380. }
  381. }
  382. #endregion
  383.  
  384. #region Fields
  385. private WinEdit mUITOEdit;
  386. #endregion
  387. }
  388.  
  389. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  390. public class UIItemWindow11 : WinWindow
  391. {
  392.  
  393. public UIItemWindow11(UITestControl searchLimitContainer) :
  394. base(searchLimitContainer)
  395. {
  396. #region Search Criteria
  397. this.SearchProperties[WinWindow.PropertyNames.ControlId] = "4100";
  398. this.WindowTitles.Add("Untitled - Message (HTML) ");
  399. #endregion
  400. }
  401.  
  402. #region Properties
  403. public WinEdit UICCEdit
  404. {
  405. get
  406. {
  407. if ((this.mUICCEdit == null))
  408. {
  409. this.mUICCEdit = new WinEdit(this);
  410. #region Search Criteria
  411. this.mUICCEdit.SearchProperties[WinEdit.PropertyNames.Name] = "Cc";
  412. this.mUICCEdit.WindowTitles.Add("Untitled - Message (HTML) ");
  413. #endregion
  414. }
  415. return this.mUICCEdit;
  416. }
  417. }
  418. #endregion
  419.  
  420. #region Fields
  421. private WinEdit mUICCEdit;
  422. #endregion
  423. }
  424.  
  425. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  426. public class UIItemWindow2 : WinWindow
  427. {
  428.  
  429. public UIItemWindow2(UITestControl searchLimitContainer) :
  430. base(searchLimitContainer)
  431. {
  432. #region Search Criteria
  433. this.SearchProperties[WinWindow.PropertyNames.ControlId] = "4101";
  434. this.WindowTitles.Add("Untitled - Message (HTML) ");
  435. this.WindowTitles.Add("hi - Message (HTML) ");
  436. #endregion
  437. }
  438.  
  439. #region Properties
  440. public WinEdit UISubjectEdit
  441. {
  442. get
  443. {
  444. if ((this.mUISubjectEdit == null))
  445. {
  446. this.mUISubjectEdit = new WinEdit(this);
  447. #region Search Criteria
  448. this.mUISubjectEdit.SearchProperties[WinEdit.PropertyNames.Name] = "Subject:";
  449. this.mUISubjectEdit.WindowTitles.Add("Untitled - Message (HTML) ");
  450. this.mUISubjectEdit.WindowTitles.Add("hi - Message (HTML) ");
  451. #endregion
  452. }
  453. return this.mUISubjectEdit;
  454. }
  455. }
  456. #endregion
  457.  
  458. #region Fields
  459. private WinEdit mUISubjectEdit;
  460. #endregion
  461. }
  462.  
  463. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  464. public class UIDocument1Window : WinWindow
  465. {
  466.  
  467. public UIDocument1Window(UITestControl searchLimitContainer) :
  468. base(searchLimitContainer)
  469. {
  470. #region Search Criteria
  471. this.SearchProperties[WinWindow.PropertyNames.Name] = "Document1";
  472. this.SearchProperties[WinWindow.PropertyNames.ClassName] = "_WwB";
  473. this.WindowTitles.Add("hi - Message (HTML) ");
  474. #endregion
  475. }
  476.  
  477. #region Properties
  478. public UIDocument1Client UIDocument1Client
  479. {
  480. get
  481. {
  482. if ((this.mUIDocument1Client == null))
  483. {
  484. this.mUIDocument1Client = new UIDocument1Client(this);
  485. }
  486. return this.mUIDocument1Client;
  487. }
  488. }
  489. #endregion
  490.  
  491. #region Fields
  492. private UIDocument1Client mUIDocument1Client;
  493. #endregion
  494. }
  495.  
  496. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  497. public class UIDocument1Client : WinClient
  498. {
  499.  
  500. public UIDocument1Client(UITestControl searchLimitContainer) :
  501. base(searchLimitContainer)
  502. {
  503. #region Search Criteria
  504. this.SearchProperties[WinControl.PropertyNames.Name] = "Document1";
  505. this.WindowTitles.Add("hi - Message (HTML) ");
  506. #endregion
  507. }
  508.  
  509. #region Properties
  510. public WinClient UIMessageClient
  511. {
  512. get
  513. {
  514. if ((this.mUIMessageClient == null))
  515. {
  516. this.mUIMessageClient = new WinClient(this);
  517. #region Search Criteria
  518. this.mUIMessageClient.SearchProperties[WinControl.PropertyNames.Name] = "Message";
  519. this.mUIMessageClient.WindowTitles.Add("hi - Message (HTML) ");
  520. #endregion
  521. }
  522. return this.mUIMessageClient;
  523. }
  524. }
  525. #endregion
  526.  
  527. #region Fields
  528. private WinClient mUIMessageClient;
  529. #endregion
  530. }
  531.  
  532. [GeneratedCode("Coded UITest Builder", "14.0.23107.0")]
  533. public class UISendWindow : WinWindow
  534. {
  535.  
  536. public UISendWindow(UITestControl searchLimitContainer) :
  537. base(searchLimitContainer)
  538. {
  539. #region Search Criteria
  540. this.SearchProperties[WinWindow.PropertyNames.ControlId] = "4256";
  541. this.WindowTitles.Add("hi - Message (HTML) ");
  542. #endregion
  543. }
  544.  
  545. #region Properties
  546. public WinButton UISendButton
  547. {
  548. get
  549. {
  550. if ((this.mUISendButton == null))
  551. {
  552. this.mUISendButton = new WinButton(this);
  553. #region Search Criteria
  554. this.mUISendButton.SearchProperties[WinButton.PropertyNames.Name] = "Send";
  555. this.mUISendButton.WindowTitles.Add("hi - Message (HTML) ");
  556. #endregion
  557. }
  558. return this.mUISendButton;
  559. }
  560. }
  561. #endregion
  562.  
  563. #region Fields
  564. private WinButton mUISendButton;
  565. #endregion
  566. }
  567. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement