sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 On 4/7/2017 at 12:44 AM, Subz said: So do you have two forms on the page with the same ID? Strange that it appears twice as Id should only be used once per page. If you also add after the For $oOption In $oOptions ConsoleWrite($oOption.InnerText & @CRLF) What does that return? Expand Here is the output expandcollapse popup--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop ID: peLateReason Name: peLateReason 01 - Operations was working with the customer or problem reporter to validate impact 02 - Operations was working with IBM support to validate impact 03 - Operations was working with a third-party vendor to validate impact 04 - A technical problem delayed validation 05 - Issue was not initially designated a critical event, or the severity changed 06 - Multiple situations were occurring at the same time 07 - Other Technical Problem (Additional Explanation Required) 08 - Other (Additional explanation required) ID: peExceptionReason Name: peExceptionReason ID: peLateReason Name: peLateReason 01 - A telephony problem at the Operator's site delayed notification 02 - A telephony problem at the Helpdesk site delayed notification 03 - The Helpdesk queue wait time exceeded the time limit for this step 04 - The Helpdesk did not answer and no voicemail was available 05 - Helpdesk contact information was not documented in the correct place 06 - Documentation was responding slowly or was unavailable 07 - Issue was not initially designated a critical event, or the severity changed 08 - Multiple situations were occurring at the same time 09 - Other Technical Problem (Additional Explanation Required) 10 - Other (Additional Explanation Required) ID: peLateReason Name: peLateReason 01 - A telephony problem at the Operator's site delayed notification 02 - A telephony problem outside the Operator's site delayed notification 03 - A problem with OneContact impeded contacting support 04 - Support contact information was not documented in the correct place or was not current 05 - Documented IBM support group did not respond or was not available 06 - Documented customer support group did not respond or was not available 07 - Documentation was responding slowly or was unavailable 08 - Issue was not initially designated a critical event, or the severity changed 09 - Multiple situations were occurring at the same time 10 - Other Technical Problem (Additional Explanation Required) 11 - Other (Additional explanation required) ID: peExceptionReason Name: peExceptionReason ID: peLateReason Name: peLateReason 01 - Operations was notified of the critical issue late by the customer 02 - Operations was notified of the critical issue late by Level 1 Operations 03 - Operations was notified of the critical issue late by an IBM Support Area 04 - Operations was notified of the critical issue late by an External Vendor/Support Area 05 - Operations was notified of the critical issue late due to a monitoring error 06 - Operations was working with the problem reporter to identify problem details 07 - Operations was working with Level 1 Operations to identify problem details 08 - Operations was working with IBM support to identify problem details 09 - Operations was working with a vendor to identify problem details 10 - Issue was not initially designated a critical event, or the severity changed 11 - Problem with OneView impeded creation or transfer of the OneView entry 12 - Multiple situations were occurring at the same time 13 - The Recovery Manager was notified of the critical issue late by Operations 14 - The Recovery Manager was notified of the critical issue late by an IBM Support Area 15 - The Recovery Manager was notified of the critical issue late by an External Vendor/Support Area 16 - Recovery Manager was working with the account team to validate critical impact 17 - Contact information for managers was difficult to find or inaccurate 18 - Resolution Eminent / Waiting on Validation 19 - Other Technical Problem (Additional Explanation Required) 20 - Other (Additional Explanation Required) ID: peExceptionReason Name: peExceptionReason ID: peLateReason Name: peLateReason 01 - Operations was notified of the critical issue late by the customer 02 - Operations was notified of the critical issue late by Level 1 Operations 03 - Operations was notified of the critical issue late by an IBM Support Area 04 - Operations was notified of the critical issue late by an External Vendor/Support Area 05 - Operations was notified of the critical issue late due to a monitoring error 06 - Operations was working with the problem reporter to identify problem details 07 - Operations was working with Level 1 Operations to identify problem details 08 - Operations was working with IBM support to identify problem details 09 - Operations was working with a vendor to identify problem details 10 - Issue was not initially designated a critical event, or the severity changed 11 - Problem with OneView impeded creation or transfer of the OneView entry 12 - Multiple situations were occurring at the same time 13 - The Recovery Manager was notified of the critical issue late by Operations 14 - The Recovery Manager was notified of the critical issue late by an IBM Support Area 15 - The Recovery Manager was notified of the critical issue late by an External Vendor/Support Area 16 - Recovery Manager was working with the account team to validate critical impact 17 - Contact information for managers was difficult to find or inaccurate 18 - Resolution Eminent / Waiting on Validation 19 - Other Technical Problem (Additional Explanation Required) 20 - Other (Additional Explanation Required) ID: TICKETING_SYSTEM Name: outage.ticketingSystem ID: CHANGE_SYSTEM Name: outage.changeSystem ID: FAILURE_TYPE Name: outage.type ID: CRITICAL Name: outage.critical ID: SEVERITY Name: outage.severity ID: ORIG_SEVERITY Name: outage.origSeverity ID: HAS_SLA Name: outage.hasSla ID: OWNERSHIP Name: outage.ownership ID: CAUSED_BY_GDC Name: outage.causedByGdc ID: WAIT_STATE Name: currentWaitState ID: PROFILE_SWITCH Name: webSession.userProfileId ID: LOGIN_STATUS Name: webSession.status ID: peExceptionReason Name: peExceptionReason ID: peLateReason Name: peLateReason 01 - Operations was notified of the critical issue late by the customer 02 - Operations was notified of the critical issue late due to a monitoring error 03 - Problem with OneView impeded creation or transfer of the OneView entry 04 - Operations was working with support to identify problem details 05 - Operations was working with the problem reporter to identify problem details 06 - Issue was not initially designated a critical event, or the severity changed 07 - Multiple situations were occurring at the same time 08 - Other Technical Problem (Additional Explanation Required) 09 - Other (Additional Explanation Required)
Subz Posted April 7, 2017 Posted April 7, 2017 Assume you added the number prefix for example: 09 - ...?
Subz Posted April 7, 2017 Posted April 7, 2017 (edited) From my first post can you change "Other (*Additional Information Required)" To "Other (Additional Explanation Required)" It basically should match the Output of $oOption.InnerText Edited April 7, 2017 by Subz
sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 On 4/7/2017 at 12:53 AM, Subz said: Assume you added the number prefix for example: 09 - ...? Expand You mean like this? If StringStripWS($oOption.InnerText, 7) = "09 - Other (Additional Information Required)" Then $oOption.Selected = True
sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 (edited) On 4/7/2017 at 12:58 AM, sammy1983 said: You mean like this? If StringStripWS($oOption.InnerText, 7) = "09 - Other (Additional Information Required)" Then $oOption.Selected = True Expand Wow.. Superb.. This worked like charm. How did you do that? Local $oSelects = _IETagNameGetCollection($oIE, "Select") Local $oOptions For $oSelect In $oSelects ConsoleWrite("ID: " & $oSelect.id & @CRLF & "Name: " & $oSelect.name & @CRLF) If $oSelect.id = "peLateReason" Then $oOptions = _IETagNameGetCollection($oSelect, "Option") For $oOption In $oOptions ConsoleWrite($oOption.InnerText & @CRLF) If StringStripWS($oOption.InnerText, 7) = "09 - Other (Additional Explanation Required)" Then $oOption.Selected = True Next EndIf Next Edited April 7, 2017 by sammy1983
Danp2 Posted April 7, 2017 Posted April 7, 2017 Quote peLateReason Expand Um.... what happened to peExceptionReason? Latest Webdriver UDF Release Webdriver Wiki FAQs
sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 On 4/7/2017 at 1:06 AM, Danp2 said: Um.... what happened to peExceptionReason? Expand Same is applicable to peExceptionReason. So I modified the code for that as well.
sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 Thanks a ton Subz for all the efforts. I have marked your code in my archive of codes. I need one last help. There is a textbox as well and I need to type just a dot (.) in it. How to do that? <textarea name="peCompletionNotes" cols="80" rows="10" id="peCompletionNotes" onchange="javascript:checkLength(this,2044);" spellcheck="true"></textarea>
sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 I found it. Local $oSelects = _IETagNameGetCollection($oIE, "textarea") Local $oOptions For $oSelect In $oSelects ConsoleWrite("ID: " & $oSelect.id & @CRLF & "Name: " & $oSelect.name & @CRLF) If $oSelect.id = "peCompletionNotes" Then _IEFormElementSetValue($oSelect, ".") EndIf Next
sammy1983 Posted April 7, 2017 Author Posted April 7, 2017 I would like to thank Subz and Danp2 for all your efforts in solving this mystery. Especially Subz who impressed me with his in-depth coding and giving me a chance to think out of the box. Thanks a ton again, Subz. As always, YOU GUYS ROCKS!!!
Subz Posted April 7, 2017 Posted April 7, 2017 Sorry for the delay had a conference call, glad you got it sorted.
Danp2 Posted April 7, 2017 Posted April 7, 2017 Circling back, it would still be interesting to know why the original attempts failed to find the desired element. What is the output from the following code? $oFrame = _IEFrameGetCollection($oIE, 0) $oForm = _IEFormGetObjByName($oFrame, "outage_processEventComplete") $Reason = _IEFormElementGetObjByName($oForm, "peExceptionReason") _IEFormElementOptionSelect($Reason, "10 - Other (Additional Explanation Required)") Latest Webdriver UDF Release Webdriver Wiki FAQs
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now