<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Double click not working in python in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286789#M4604064</link>
    <description>&lt;P&gt;I just did the recording. I confirm that it get the same and it works for me:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/chk[1,5]").selected = True&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Aug 2020 19:12:27 GMT</pubDate>
    <dc:creator>Sandra_Rossi</dc:creator>
    <dc:date>2020-08-13T19:12:27Z</dc:date>
    <item>
      <title>Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaq-p/12286777</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I'm trying to access information by double click on a cell and it is not working. After the entering into the screen i'm unable to print any details. the automation fails.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell").selectedNode = "0000000022"
session.findById("wnd[0]/usr/cntlIMAGE_CONTAINER/shellcont/shell/shellcont[0]/shell").doubleClickNode("0000000022")
session.findById("wnd[0]/usr/ctxtER_STAT").text = "R"
session.findById("wnd[0]/usr/ctxtER_BP2-LOW").text = b+"*"
session.findById("wnd[0]/usr/ctxtER_RTN_D-LOW").text = today
session.findById("wnd[0]/usr/ctxtER_RTN_D-HIGH").text = today
session.findById("wnd[0]/tbar[1]/btn[8]").press()
---Code works fine until here The screen with the information reflects-- The below code does not work-            
print("In the details page")
session.findById("wnd[0]/usr/lbl[3,5]").setFocus()
print("focus")
session.findById("wnd[0]/usr/lbl[3,5]").caretPosition = 0
session.findById("wnd[0]").sendVKey(2)
print("Success")

Attached is image of the view. I'm unable to change this to a grid view.

Regards,
Renato.



&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Aug 2020 17:16:25 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaq-p/12286777</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-12T17:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286778#M4604053</link>
      <description>&lt;P&gt;Here is the image posted by the OP:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1833912-1833905-error1.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 18:50:56 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286778#M4604053</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-12T18:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286779#M4604054</link>
      <description>&lt;P&gt;hard to say with the info provided, but try &lt;/P&gt;&lt;P&gt;session.findById("wnd[0]").sendVKey 19 &lt;/P&gt;&lt;P&gt;to display the focused data in a pop-up.  &lt;/P&gt;</description>
      <pubDate>Wed, 12 Aug 2020 20:26:01 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286779#M4604054</guid>
      <dc:creator>daniel_mccollum</dc:creator>
      <dc:date>2020-08-12T20:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286780#M4604055</link>
      <description>&lt;P&gt;Hi Daniel,&lt;/P&gt;&lt;P&gt;I'm entering date and type to come to the screenshot that i shared. To go to the next screen when i do it manually i need to double click on the row and it provides the required data. The problem is that when i go to the next screen the code fails.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 11:00:30 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286780#M4604055</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-13T11:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286781#M4604056</link>
      <description>&lt;P&gt;sendVKey 2 = F2 (same as double-click)&lt;/P&gt;&lt;P&gt;sendVKey 19 = Shift+F7 (same as ALV List function code &amp;amp;CRE "Last Column" ?)&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 11:56:32 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286781#M4604056</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T11:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286782#M4604057</link>
      <description>&lt;P&gt;You don't explain what goal you want to achieve.&lt;/P&gt;&lt;P&gt;Anyway, if you expect to set the cursor at the output-only text ("label") which starts at column 3, row 5, then this code is fine:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/lbl[3,5]").setFocus()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If you want to position at "RR" (output-only text starting at column 22, row 0), then you should do:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/lbl[22,0]").setFocus()
&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Concerning the double-click, it corresponds to pressing F2, so this code is fine:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]").sendVKey 2 ' Press F2&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 11:58:59 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286782#M4604057</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T11:58:59Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286783#M4604058</link>
      <description>&lt;P&gt;Hi Sandra,&lt;/P&gt;&lt;P&gt;I'm trying to double click on the label. Which would in turn take me to the next screen. The challenge i'm facing it that it is not recognizing either the &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/lbl[3,5]").setFocus()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or &lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]").sendVKey 2 ' Press F2&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I'm not sure why it is not working.&lt;/P&gt;&lt;P&gt;There is a tiny check box beside the label.  I have  tried setting that as true as well and it still does not work. Which is quite puzzeling for me.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Renato.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 13:20:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286783#M4604058</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-13T13:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286784#M4604059</link>
      <description>&lt;P&gt;I don't understand why your code doesn't work and my code works, although it has exactly the same lines of code.&lt;/P&gt;&lt;P&gt;Are you sure that there's a label starting at column 3 (4th column) and row 5 (6th row)? If no and if SAP GUI doesn't send an error message, then it means that you handle all errors, so you will have big issues to troubleshoot your code! Just don't handle all errors.&lt;/P&gt;&lt;P&gt;What checkbox are you talking about?&lt;/P&gt;&lt;P&gt;Could you please provide screenshots corresponding to what you expect?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 15:39:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286784#M4604059</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T15:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286785#M4604060</link>
      <description>&lt;P&gt;This is the code for the check box and box is being highlighted but it does not get selected.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/chk[1,5]").selected = True&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 15:50:00 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286785#M4604060</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-13T15:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286786#M4604061</link>
      <description>&lt;P&gt;&lt;A href="https://answers.sap.com/storage/temp/1833947-check-box.png"&gt;check-box.png&lt;/A&gt;&lt;/P&gt;&lt;P&gt;This is the check box image and im not trying to catch any error. &lt;/P&gt;&lt;P&gt;I tired selecting all the checkbox using the below code and it does not work.&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/tbar[1]/btn[5]").press()&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Not sure it is a problem with the GUI. When i record it i find the options are correct.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 16:36:17 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286786#M4604061</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2020-08-13T16:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286787#M4604062</link>
      <description>&lt;P&gt;Here is the image posted by the OP:&lt;/P&gt;&lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/1833948-1833947-check-box1.png" /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 17:16:18 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286787#M4604062</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T17:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286788#M4604063</link>
      <description>&lt;P&gt;It doesn't look like the original question, which was about double-clicking an output-only text field. Is this solved now?&lt;/P&gt;&lt;P&gt;I don't understand why you show all these different codes. Could you just show what code the Script Recorder produce when you click the checkbox please? &lt;/P&gt;</description>
      <pubDate>Thu, 13 Aug 2020 17:23:07 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286788#M4604063</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T17:23:07Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286789#M4604064</link>
      <description>&lt;P&gt;I just did the recording. I confirm that it get the same and it works for me:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;session.findById("wnd[0]/usr/chk[1,5]").selected = True&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 19:12:27 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286789#M4604064</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T19:12:27Z</dc:date>
    </item>
    <item>
      <title>Re: Double click not working in python</title>
      <link>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286790#M4604065</link>
      <description>&lt;P&gt;I think that you have several SAP GUI sessions, and you are running the script on the wrong session.&lt;/P&gt;&lt;P&gt;I've got this VBS script that you may adapt to python, to list the opened SAP GUI sessions and ask the user which session (variable &lt;STRONG&gt;sess&lt;/STRONG&gt;) is to be used to run the script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Set Wrapper = WScript.CreateObject("SapROTWr.SapROTWrapper")
Set SapGui = Wrapper.GetROTEntry("SAPGUI")
Set application = sapgui.GetScriptingEngine

if application.Children.count = 0 then
  msgbox("please start a SAP GUI session")
  wscript.quit 0
end if

prepared_question = "Choose the session:" + chr(13)
set mysessions = CreateObject("Scripting.Dictionary")
sessionNumber = -1
for connNr = 0 to application.Children.Length - 1
  set conn = application.children.ElementAt(connNr)
  for sessNr = 0 to conn.Children.Length - 1
    set sess = conn.children.ElementAt(sessNr)
    If sess.Busy = false Then
      set window = sess.ActiveWindow
      sessionNumber = sessionNumber + 1
      mysessions.add cstr(sessionNumber), cstr(connNr) &amp;amp; "," &amp;amp; cstr(sessNr)
      prepared_question = prepared_question &amp;amp; cstr(sessionNumber) &amp;amp; ": " &amp;amp; window.text &amp;amp; chr(13)
    End If
  next
next

sessionNumber = inputbox(prepared_question)
if sessionNumber = "" then
  WScript.quit 0
end if

arrSession = split(mysessions.item(sessionNumber),",")
set conn = application.children.ElementAt(cint(arrSession(0)))
set sess = conn.children.ElementAt(cint(arrSession(1)))
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Aug 2020 19:28:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/double-click-not-working-in-python/qaa-p/12286790#M4604065</guid>
      <dc:creator>Sandra_Rossi</dc:creator>
      <dc:date>2020-08-13T19:28:44Z</dc:date>
    </item>
  </channel>
</rss>

