setTimeout(function()
{
if (document.getElementById(\"Passwd\")) {
document.getElementById(\"Passwd\").value = \"password\";
document.getElementById(\"signIn\").click();
}
}, 1000);
}
6. Run the code: It works as expected and the login window is opened, the credentials added and clicks on the sign in button
7. The token is generated and can be used in the request
Now my problem:
If I send the request now everything works as expected (because I have the token) but if I delete the token and send the request without running the code within the Automation window (to retrieve the token), it fails.
Have you ever had this issue? Were you able to make it work without the need to run the automation code manually before sending the request?
Thanks
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"208","kudosSumWeight":0,"repliesCount":0,"postTime":"2016-07-27T01:00:08.605-07:00","lastPublishTime":"2016-07-27T01:02:01.556-07:00","metrics":{"__typename":"MessageMetrics","views":729},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:soapui-os-community/community:nwkab66374board:SoapUI_OS/message:123770/message:123873","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"readOnly":false,"editFrozen":false,"body@stringLength":"1604","rawBody":"
Sure Rao,
Just to be clear the steps I used for oAuth are as follows:
1. For the REST request step I click on the Auth tab (where I have created and added a new authorization)
2. Click on get token
3. Set the details for the client identification, authorization URI, Redirect URI
4. Click on the Automation tab
5. Write the code:
if (document.getElementById(\"Email\")) {
document.getElementById(\"Email\").value = \"xxxx@gmail.com\";
document.getElementById(\"next\").click();
setTimeout(function()
{
if (document.getElementById(\"Passwd\")) {
document.getElementById(\"Passwd\").value = \"password\";
document.getElementById(\"signIn\").click();
}
}, 1000);
}
6. Run the code: It works as expected and the login window is opened, the credentials added and clicks on the sign in button
7. The token is generated and can be used in the request
Now my problem:
If I send the request now everything works as expected (because I have the token) but if I delete the token and send the request without running the code within the Automation window (to retrieve the token), it fails.
Have you ever had this issue? Were you able to make it work without the need to run the automation code manually before sending the request?
Thanks
","images":{"__typename":"AssociatedImageConnection","edges":[],"totalCount":0,"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}},"timeToRead":1,"currentRevision":{"__ref":"Revision:revision:123873_2"},"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":[]}}}},"Revision:revision:123873_2":{"__typename":"Revision","id":"revision:123873_2","lastEditTime":"2016-07-27T01:02:01.556-07:00"}}}},"page":"/forums/ForumMessagePage/ForumMessagePage","query":{"boardId":"soapui_os","messageSubject":"how-can-i-run-a-test-containing-oauth-without-manual-input","messageId":"123770","replyId":"123828"},"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","../shared/client/components/common/List/UnstyledList/UnstyledList.tsx","./components/messages/MessageView/MessageView.tsx","./components/messages/MessageView/MessageViewInline/MessageViewInline.tsx","../shared/client/components/common/Pager/PagerLoadMore/PagerLoadMore.tsx","./components/customComponent/CustomComponentContent/TemplateContent.tsx"],"appGip":true,"scriptLoader":[]}