<?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 Loop through Tabs in C# in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-through-tabs-in-c/m-p/12090841#M1971773</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I am able to connect to SAP WinGUI and search all the objects. This is in c#.&lt;/P&gt;
  &lt;P&gt;The only thing that doesn't work is to loop through the tabs. I get an SAP error, when I have Selected a Tab.&lt;/P&gt;
  &lt;P&gt;My code is the following (for now).&lt;/P&gt;
  &lt;P&gt;What am I doing wrong here?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;                    GuiTabStrip objGuiTabStrip = (node as GuiTabStrip);
                    for (int i = 0; i &amp;lt; intNumberOfTabs; i++)
                    {
                        string strTab = objGuiTabStrip.Children.Item(i).Id.ToString(); // --&amp;gt; here the errors drops in the second iteration
                        string strTabType = objGuiTabStrip.FindById(strTab).Type.ToString();

                        GuiTab objGuiTab = (GuiTab)objGuiTabStrip.FindById(strTab);
                        string strGuiTab = objGuiTab.Text;
                        
                        GuiTab blabla = (GuiTab)session.FindById(strTab);
                        blabla.Select();   

                        Console.WriteLine(strTab + " - " + strTabType + " - " + strGuiTab);

                    }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 13 Sep 2019 09:19:23 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2019-09-13T09:19:23Z</dc:date>
    <item>
      <title>Loop through Tabs in C#</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/loop-through-tabs-in-c/m-p/12090841#M1971773</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I am able to connect to SAP WinGUI and search all the objects. This is in c#.&lt;/P&gt;
  &lt;P&gt;The only thing that doesn't work is to loop through the tabs. I get an SAP error, when I have Selected a Tab.&lt;/P&gt;
  &lt;P&gt;My code is the following (for now).&lt;/P&gt;
  &lt;P&gt;What am I doing wrong here?&lt;/P&gt; 
  &lt;PRE&gt;&lt;CODE&gt;                    GuiTabStrip objGuiTabStrip = (node as GuiTabStrip);
                    for (int i = 0; i &amp;lt; intNumberOfTabs; i++)
                    {
                        string strTab = objGuiTabStrip.Children.Item(i).Id.ToString(); // --&amp;gt; here the errors drops in the second iteration
                        string strTabType = objGuiTabStrip.FindById(strTab).Type.ToString();

                        GuiTab objGuiTab = (GuiTab)objGuiTabStrip.FindById(strTab);
                        string strGuiTab = objGuiTab.Text;
                        
                        GuiTab blabla = (GuiTab)session.FindById(strTab);
                        blabla.Select();   

                        Console.WriteLine(strTab + " - " + strTabType + " - " + strGuiTab);

                    }
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2019 09:19:23 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/loop-through-tabs-in-c/m-p/12090841#M1971773</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2019-09-13T09:19:23Z</dc:date>
    </item>
  </channel>
</rss>

