Dim EventId
EventId = \"\"
'Runs the \"SwitchingManager\" tested application.
Call TestedApps.SwitchingManager.Run
'Clicks the 'btnNew' button.
Call Aliases.SwitchingManager.frmSwitchingManagerMain.ucTransEventSummaryDisplay.pnlActionButtons.btnNew.ClickButton
'Clicks the 'btnCreatePlannedOutage' button.
Call Aliases.SwitchingManager.frmCreateEvent.flpButtons.pnlCreatePlannedOutage.btnCreatePlannedOutage.ClickButton
'Selects the 'Alfermann Tap' item of the 'cboLocation' combo box.
Call Aliases.SwitchingManager.frmTransEventDetail.ucPlannedOutageDetailPanel.pnlControls.cboLocation.ClickItem(\"Alfermann Tap\")
'Clicks at point (194, 15) of the 'txtReason' object.
Call Aliases.SwitchingManager.frmTransEventDetail.ucPlannedOutageDetailPanel.pnlControls.txtReason.Click(194, 15)
'Enters the text 'test' in the 'txtReason' text editor.
Call Aliases.SwitchingManager.frmTransEventDetail.ucPlannedOutageDetailPanel.pnlControls.txtReason.SetText(\"test\")
'Clicks at point (187, 13) of the 'txtEquipmentNotes' object.
Call Aliases.SwitchingManager.frmTransEventDetail.SplitContainer1.SplitterPanel.pnlScrollableContent.ucPlannedOutageEquipmentPanel.pnlControls.txtEquipmentNotes.Click(187, 13)
'Enters 'test' in the 'txtEquipmentNotes' object.
Call Aliases.SwitchingManager.frmTransEventDetail.SplitContainer1.SplitterPanel.pnlScrollableContent.ucPlannedOutageEquipmentPanel.pnlControls.txtEquipmentNotes.Keys(\"test\")
'Selects the 'Out of Service' item of the 'cboProtectionType' combo box.
Call Aliases.SwitchingManager.frmTransEventDetail.SplitContainer1.SplitterPanel.pnlScrollableContent.ucPlannedProtectionAndGroundingPanel.pnlControls.cboProtectionType.ClickItem(\"Out of Service\")
'Clicks the 'Save' item of the 'tsTransEventActions' bar.
Call Aliases.SwitchingManager.frmTransEventDetail.ucTransEventActionToolbar.pnlControls.tsTransEventActions.ClickItem(\"Save\")
'Gets the new value in txtEventId
EventId = Aliases.SwitchingManager.frmTransEventDetail.ucEventHeaderPanel.pnlControls.txtEventId.Text
'Writes the specified string to a text file.
Call aqFile.WriteToTextFile(\"file.txt\", EventId, 22, True)
'Closes the 'frmTransEventDetail' window.
Call Aliases.SwitchingManager.frmTransEventDetail.Close
'Closes the 'frmSwitchingManagerMain' window.
Call Aliases.SwitchingManager.frmSwitchingManagerMain.Close
End Sub
Robert,
I have followed your instructions and the test executes without an error. If I put a breakpoint on the line which calls \"aqFile.WriteToTextFile\" I can see the correct value in variable \"EventId.\" However, the value of the new EventId is not getting written to the file. Please take a look and tell me where I am missing something.
Sub Test2()
Dim EventId
EventId = \"\"
'Runs the \"SwitchingManager\" tested application.
Call TestedApps.SwitchingManager.Run
'Clicks the 'btnNew' button.
Call Aliases.SwitchingManager.frmSwitchingManagerMain.ucTransEventSummaryDisplay.pnlActionButtons.btnNew.ClickButton
'Clicks the 'btnCreatePlannedOutage' button.
Call Aliases.SwitchingManager.frmCreateEvent.flpButtons.pnlCreatePlannedOutage.btnCreatePlannedOutage.ClickButton
'Selects the 'Alfermann Tap' item of the 'cboLocation' combo box.
Call Aliases.SwitchingManager.frmTransEventDetail.ucPlannedOutageDetailPanel.pnlControls.cboLocation.ClickItem(\"Alfermann Tap\")
'Clicks at point (194, 15) of the 'txtReason' object.
Call Aliases.SwitchingManager.frmTransEventDetail.ucPlannedOutageDetailPanel.pnlControls.txtReason.Click(194, 15)
'Enters the text 'test' in the 'txtReason' text editor.
Call Aliases.SwitchingManager.frmTransEventDetail.ucPlannedOutageDetailPanel.pnlControls.txtReason.SetText(\"test\")
'Clicks at point (187, 13) of the 'txtEquipmentNotes' object.
Call Aliases.SwitchingManager.frmTransEventDetail.SplitContainer1.SplitterPanel.pnlScrollableContent.ucPlannedOutageEquipmentPanel.pnlControls.txtEquipmentNotes.Click(187, 13)
'Enters 'test' in the 'txtEquipmentNotes' object.
Call Aliases.SwitchingManager.frmTransEventDetail.SplitContainer1.SplitterPanel.pnlScrollableContent.ucPlannedOutageEquipmentPanel.pnlControls.txtEquipmentNotes.Keys(\"test\")
'Selects the 'Out of Service' item of the 'cboProtectionType' combo box.
Call Aliases.SwitchingManager.frmTransEventDetail.SplitContainer1.SplitterPanel.pnlScrollableContent.ucPlannedProtectionAndGroundingPanel.pnlControls.cboProtectionType.ClickItem(\"Out of Service\")
'Clicks the 'Save' item of the 'tsTransEventActions' bar.
Call Aliases.SwitchingManager.frmTransEventDetail.ucTransEventActionToolbar.pnlControls.tsTransEventActions.ClickItem(\"Save\")
'Gets the new value in txtEventId
EventId = Aliases.SwitchingManager.frmTransEventDetail.ucEventHeaderPanel.pnlControls.txtEventId.Text
'Writes the specified string to a text file.
Call aqFile.WriteToTextFile(\"file.txt\", EventId, 22, True)
'Closes the 'frmTransEventDetail' window.
Call Aliases.SwitchingManager.frmTransEventDetail.Close
'Closes the 'frmSwitchingManagerMain' window.
Call Aliases.SwitchingManager.frmSwitchingManagerMain.Close
End Sub
Found my error. Very stupid. I didn't specify the whole path to the file. Should have been \"C:\\temp\\file.txt\"
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"129","kudosSumWeight":1,"repliesCount":0,"postTime":"2019-11-15T13:32:33.891-08:00","lastPublishTime":"2019-11-15T13:32:33.891-08:00","metrics":{"__typename":"MessageMetrics","views":2141},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:193701/message:193719","customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"readOnly":false,"editFrozen":false,"body@stringLength":"134","rawBody":"Found my error. Very stupid. I didn't specify the whole path to the file. Should have been \"C:\\temp\\file.txt\"
","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:193719_1"},"latestVersion":null,"messagePolicies":{"__typename":"MessagePolicies","canModerateSpamMessage":{"__typename":"PolicyResult","failureReason":{"__typename":"FailureReason","message":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","key":"error.lithium.policies.feature.moderation_spam.action.moderate_entity.allowed.accessDenied","args":[]}}}},"QueryVariables:MessageSolutions":{"__typename":"QueryVariables","id":"MessageSolutions","value":{"first":10,"constraints":{"topicId":{"eq":"message:193701"},"solution":{"eq":true}},"sorts":{"postTime":{"direction":"ASC"}},"useAvatar":true,"useAuthorLogin":true,"useAuthorRank":false,"useBody":true,"useKudosCount":false,"useTimeToRead":false,"useMedia":true,"useRepliesCount":false,"useSearchSnippet":false,"useAcceptedSolutionButton":true,"useSolvedBadge":false,"useAttachments":true,"useTags":false,"useUserHoverCard":false,"useNodeHoverCard":false,"usePreviewSubjectModal":false,"useMessageStatus":false}},"CachedAsset:text:en_US-components/messages/EscalatedMessageBanner-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/EscalatedMessageBanner-1741125846000","value":{"escalationMessage":"Escalated to Salesforce by {username} on {date}","viewDetails":"View Details","modalTitle":"Case Details","escalatedBy":"Escalated by: ","escalatedOn":"Escalated on: ","caseNumber":"Case Number: ","status":"Status: ","lastUpdateDate":"Last Update: ","automaticEscalation":"automatic escalation","anonymous":"Anonymous"},"localOverride":false},"CachedAsset:text:en_US-components/users/UserLink-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/users/UserLink-1741125846000","value":{"authorName":"View Profile: {author}","anonymous":"Anonymous"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/users/UserRank-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserRank-1741125846000","value":{"rankName":"{rankName}","userRank":"Author rank {rankName}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageTime-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageTime-1741125846000","value":{"postTime":"Published: {time}","lastPublishTime":"Last Update: {time}","conversation.lastPostingActivityTime":"Last posting activity time: {time}","conversation.lastPostTime":"Last post time: {time}","moderationData.rejectTime":"Rejected time: {time}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSolvedBadge-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSolvedBadge-1741125846000","value":{"solved":"Solved"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSubject-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSubject-1741125846000","value":{"noSubject":"(no subject)"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageBody-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageBody-1741125846000","value":{"showMessageBody":"Show More","mentionsErrorTitle":"{mentionsType, select, board {Board} user {User} message {Message} other {}} No Longer Available","mentionsErrorMessage":"The {mentionsType} you are trying to view has been removed from the community.","videoProcessing":"Video is being processed. Please try again in a few minutes.","bannerTitle":"Video provider requires cookies to play the video. Accept to continue or {url} it directly on the provider's site.","buttonTitle":"Accept","urlText":"watch"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageCustomFields-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageCustomFields-1741125846000","value":{"CustomField.default.label":"Value of {name}"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageReplyButton-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageReplyButton-1741125846000","value":{"repliesCount":"{count}","title":"Reply","title@board:BLOG@message:root":"Comment","title@board:TKB@message:root":"Comment","title@board:IDEA@message:root":"Comment","title@board:OCCASION@message:root":"Comment"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageSolutionList-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageSolutionList-1741125846000","value":{"emptyDescription":"No has been message solutions yet"},"localOverride":false},"CachedAsset:text:en_US-components/messages/AcceptedSolutionButton-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/AcceptedSolutionButton-1741125846000","value":{"accept":"Mark as Solution","accepted":"Marked as Solution","errorHeader":"Error!","errorAdd":"There was an error marking as solution.","errorRemove":"There was an error unmarking as solution.","solved":"Solved","topicAlreadySolvedErrorTitle":"Solution Already Exists","topicAlreadySolvedErrorDesc":"Refresh the browser to view the existing solution"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/common/Pager/PagerLoadMore-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/common/Pager/PagerLoadMore-1741125846000","value":{"loadMore":"Show More"},"localOverride":false},"CachedAsset:text:en_US-components/messages/MessageView/MessageViewInline-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/messages/MessageView/MessageViewInline-1741125846000","value":{"bylineAuthor":"{bylineAuthor}","bylineBoard":"{bylineBoard}","anonymous":"Anonymous","place":"Place {bylineBoard}","gotoParent":"Go to parent {name}"},"localOverride":false},"Revision:revision:193703_1":{"__typename":"Revision","id":"revision:193703_1","lastEditTime":"2019-11-15T11:14:05.688-08:00"},"Revision:revision:193717_1":{"__typename":"Revision","id":"revision:193717_1","lastEditTime":"2019-11-15T13:03:08.400-08:00"},"Revision:revision:193719_1":{"__typename":"Revision","id":"revision:193719_1","lastEditTime":"2019-11-15T13:32:33.891-08:00"},"CachedAsset:text:en_US-shared/client/components/users/UserAvatar-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/users/UserAvatar-1741125846000","value":{"altText":"{login}'s avatar","altTextGeneric":"User's avatar"},"localOverride":false},"CachedAsset:text:en_US-shared/client/components/ranks/UserRankLabel-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-shared/client/components/ranks/UserRankLabel-1741125846000","value":{"altTitle":"Icon for {rankName} rank"},"localOverride":false},"CachedAsset:text:en_US-components/tags/TagView/TagViewChip-1741125846000":{"__typename":"CachedAsset","id":"text:en_US-components/tags/TagView/TagViewChip-1741125846000","value":{"tagLabelName":"Tag name {tagName}"},"localOverride":false}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"testcomplete-questions","messageSubject":"keyword-test---get-new-id-value-from-textbox","messageId":"193701"},"buildId":"q_bLpq2mflH0BeZigxpj6","runtimeConfig":{"buildInformationVisible":false,"logLevelApp":"info","logLevelMetrics":"info","openTelemetryClientEnabled":false,"openTelemetryConfigName":"smartbear","openTelemetryServiceVersion":"25.2.0","openTelemetryUniverse":"prod","openTelemetryCollector":"http://localhost:4318","openTelemetryRouteChangeAllowedTime":"5000","apolloDevToolsEnabled":false,"inboxMuteWipFeatureEnabled":false},"isFallback":false,"isExperimentalCompile":false,"dynamicIds":["./components/seo/QAPageSchema/QAPageSchema.tsx","./components/community/Navbar/NavbarWidget.tsx","./components/community/Breadcrumb/BreadcrumbWidget.tsx","./components/messages/TopicWithThreadedReplyListWidget/TopicWithThreadedReplyListWidget.tsx","./components/messages/MessageListForNodeByRecentActivityWidget/MessageListForNodeByRecentActivityWidget.tsx","./components/messages/RelatedContentWidget/RelatedContentWidget.tsx","./components/customComponent/CustomComponent/CustomComponent.tsx","./components/messages/MessageView/MessageViewStandard/MessageViewStandard.tsx","./components/messages/ThreadedReplyList/ThreadedReplyList.tsx","../shared/client/components/common/List/UnstyledList/UnstyledList.tsx","./components/messages/MessageView/MessageView.tsx","../shared/client/components/common/Pager/PagerLoadMore/PagerLoadMore.tsx","./components/messages/MessageView/MessageViewInline/MessageViewInline.tsx","./components/customComponent/CustomComponentContent/TemplateContent.tsx","../shared/client/components/common/List/UnwrappedList/UnwrappedList.tsx","./components/tags/TagView/TagView.tsx","./components/tags/TagView/TagViewChip/TagViewChip.tsx"],"appGip":true,"scriptLoader":[]}