on 2018 Oct 05 11:37 PM
IW31
I have recorded a script for automation for ordering parts. It works very well, however, when I passed it to another person, it failed.
What I found was that he keeps his long text window collapsed, while I keep mine open. (I would have thought they would be the same control, but no.)
So, how to I test which long text window is displayed?
This is the collapsed object,
Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/txtCAUFVD-KTEXT").Text = "BENCHSTOCK"
While this is the expanded long text control.
Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/subSUB_TEXT:SAPLCOIH:1103/cntlLTEXT/shell").Text = "BENCHSTOCK"
I tried creating a variable to test it, but it tests True no matter the selection.
Set ShortComment = Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/txtCAUFVD-KTEXT")
'Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/txtCAUFVD-KTEXT").Text = "TESTING"
If IsObject(ShortComment) Then
Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/txtCAUFVD-KTEXT").Text = "BENCHSTOCK"
Else
Session.findById("wnd[0]/usr/subSUB_ALL:SAPLCOIH:3001/ssubSUB_LEVEL:SAPLCOIH:1100/subSUB_KOPF:SAPLCOIH:1102/subSUB_TEXT:SAPLCOIH:1103/cntlLTEXT/shell").Text = "BENCHSTOCK"
End If
Thanks in advance!
Request clarification before answering.
| User | Count |
|---|---|
| 17 | |
| 16 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.