<?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>topic How to switch windows by using script in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-switch-windows-by-using-script/m-p/12636189#M2013836</link>
    <description>&lt;P&gt;Sometimes I need to use automation to handle some transactions,&lt;/P&gt;
  &lt;P&gt;Script process: click login, then open a new window and enter the user name and password.&lt;/P&gt;
  &lt;P&gt;But there is a problem here. I may have opened some windows, which will cause my script to report an error when I can't find the box for entering user name and password.&lt;/P&gt;
  &lt;P&gt;For example, I have opened a window with ID: &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;/app/con[0]/ses[0]/wnd[0]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The new login window ID is,&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;/app/con[1]/ses[0]/wnd[0]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;During script operation, the default window is: &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;/app/con[0]/ses[0]/wnd[0]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;, and then an error occurs.&lt;/P&gt;
  &lt;P&gt;How can I automatically recognize the script and switch to the correct window?&lt;/P&gt;
  &lt;P&gt;I tried using：&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;session.findById('/app/con[1]/ses[0]/wnd[0]').xxx&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;,But this will report an error.&lt;/P&gt;</description>
    <pubDate>Sun, 15 May 2022 08:47:52 GMT</pubDate>
    <dc:creator>former_member803963</dc:creator>
    <dc:date>2022-05-15T08:47:52Z</dc:date>
    <item>
      <title>How to switch windows by using script</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-switch-windows-by-using-script/m-p/12636189#M2013836</link>
      <description>&lt;P&gt;Sometimes I need to use automation to handle some transactions,&lt;/P&gt;
  &lt;P&gt;Script process: click login, then open a new window and enter the user name and password.&lt;/P&gt;
  &lt;P&gt;But there is a problem here. I may have opened some windows, which will cause my script to report an error when I can't find the box for entering user name and password.&lt;/P&gt;
  &lt;P&gt;For example, I have opened a window with ID: &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;/app/con[0]/ses[0]/wnd[0]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The new login window ID is,&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;/app/con[1]/ses[0]/wnd[0]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;During script operation, the default window is: &lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;/app/con[0]/ses[0]/wnd[0]&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;, and then an error occurs.&lt;/P&gt;
  &lt;P&gt;How can I automatically recognize the script and switch to the correct window?&lt;/P&gt;
  &lt;P&gt;I tried using：&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;session.findById('/app/con[1]/ses[0]/wnd[0]').xxx&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;,But this will report an error.&lt;/P&gt;</description>
      <pubDate>Sun, 15 May 2022 08:47:52 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/how-to-switch-windows-by-using-script/m-p/12636189#M2013836</guid>
      <dc:creator>former_member803963</dc:creator>
      <dc:date>2022-05-15T08:47:52Z</dc:date>
    </item>
  </channel>
</rss>

