public void AddKeyword(UITestFramework.Object.Keyword keyword) { #region Variable Declarations WinEdit uITBNameEdit = UIMicrosoftadlabsUSDadWindow.UITBNameWindow.UITBNameEdit; WinEdit uIDestinationUrlEdit = UIMicrosoftadlabsUSDadWindow.UIAdCenterOrderItemEdiWindow.UIButtonEditDestinatioEdit; #endregion // Type 'aaa' in 'TBName' text box uITBNameEdit.Text = keyword.Keywords; // Type 'bbb{Enter}' in 'Append text' text box uIDestinationUrlEdit.Text = keyword.DesURL; Keyboard.SendKeys(uIDestinationUrlEdit, "{Enter}", ModifierKeys.None); }
public void VerifyAdPreview(UITestFramework.Object.TextAdvertisement textAdObject) { Assert.AreEqual<string>(textAdObject.Title, this.UIMicrosoftadlabsUSD__Window.lableTitle.Name); Assert.AreEqual<string>(textAdObject.Text, this.UIMicrosoftadlabsUSD__Window.labelText.Name); Assert.AreEqual<string>(textAdObject.DisplayUrl, this.UIMicrosoftadlabsUSD__Window.LBDisplayURL.Name); }
private void getSponsorStoryAdvertisement(AdType type, out UITestFramework.Object.Campaign addingCampaign, out UITestFramework.Object.Advertisement addingAd) { //Adding campaign through api UITestFramework.Object.Campaign addingCampaignThroughApi = UITestFramework.Object.Campaign.NextCampaign(RandomData); addingCampaign = addingCampaignThroughApi; long campaignId = TestHelper.CreateCampaignsApi(addingCampaignThroughApi); this.deleteCampaignIds.Add(campaignId); //Adding advertisement through api UITestFramework.Object.Advertisement addingAdvertisementThroughApi = new Advertisement(); switch (type) { case AdType.Page_Like_Story: addingAdvertisementThroughApi = Facebook.UITestFramework.Object.Advertisement.NextPageLikeStoryAdvertisement(this.RandomData); break; case AdType.Page_Post_Story: addingAdvertisementThroughApi = Facebook.UITestFramework.Object.Advertisement.NextPagePostStoryAdvertisement(this.RandomData); break; case AdType.Page_Post_Like_Story: addingAdvertisementThroughApi = Facebook.UITestFramework.Object.Advertisement.NextPagePostLikeStoryAdvertisement(this.RandomData); break; case AdType.App_Share_Story: addingAdvertisementThroughApi = Facebook.UITestFramework.Object.Advertisement.NextAppShareStoryAdvertisement(this.RandomData); break; case AdType.App_Used_Story: addingAdvertisementThroughApi = Facebook.UITestFramework.Object.Advertisement.NextAppUsedStoryAdvertisement(this.RandomData); break; default: break; } addingAdvertisementThroughApi.CampaignName = addingCampaignThroughApi.Name; addingAd = addingAdvertisementThroughApi; TestHelper.CreateSponsorStoryAdvertisementsApi(addingAdvertisementThroughApi); TestHelper.GetAdvertisementUI(addingCampaignThroughApi, addingAdvertisementThroughApi); }