yogesh vasu

yogesh vasu

  • NA
  • 36
  • 1.4k

C# Tab control in web page

Aug 6 2018 3:17 AM
Hello Everyone ,
 
I am having url in that i could control all HTML elements except tab elements in a <Li> Class i have tried all possible ways but i could not find
 
Tab structure tags for Details Tab
 
<li class="x-tab-strip-active" id="infoPageinfoPanelID__infoPage_myTab_object_aspsInfoDetailsTab"> <a class="x-tab-strip-close" id="ext-gen156"></a> <a class="x-tab-right" href="#" id="ext-gen157"> <em class="x-tab-left"><span class="x-tab-strip-inner"> <span class="x-tab-strip-text ">Details</span></span></em></a></li>
 
Tab structure tags for Related Objects Tab
 
<li class="" id="infoPageinfoPanelID__infoPage_myTab_object_ASPSInfoRelatedItemsTab"> <a class="x-tab-strip-close" id="ext-gen158"></a> <a class="x-tab-right" href="#" id="ext-gen159"> <em class="x-tab-left"> <span class="x-tab-strip-inner"><span class="x-tab-strip-text ">Related Objects</span></span></em></a></li>
  1. while (_Processing)    
  2. {    
  3.     Application.DoEvents();    
  4.     if (doc != null)    
  5.     {    
  6.         while (x == 0)    
  7.         {    
  8.             System.Windows.Forms.Application.DoEvents();
  9.             IHTMLElementCollection curTags6 = doc.getElementsByTagName("li");
  10.             foreach (var curElement in curTags6)    
  11.             {    
  12.                 HTMLLIElementClass curATag = ((mshtml.HTMLLIElementClass)curElement);
  13.                 lstATags.Add(curATag.innerHTML);    
  14.                 var curAnchorText = curATag.innerHTML != null ? curATag.innerHTML : null;
  15.                 if (curAnchorText != null && curAnchorText.Contains("Related Objects"))
  16.                 {                         
  17.                     IHTMLElementCollection curTags7 = doc.getElementsByTagName("li");
  18.                     foreach (var curElement1 in curTags7)    
  19.                     {    
  20.                         HTMLLIElementClass curATag1 = ((mshtml.HTMLLIElementClass)curElement1);    
  21.                         lstATags.Add(curATag1.innerHTML);    
  22.                         var curAnchorText1 = curATag1.innerHTML != null ? curATag1.innerHTML : null;
  23.                         if (curAnchorText1 != null && curAnchorText1.Contains("Details"))
  24.                         {    
  25.                             curATag1.IHTMLElement_className = "";    
  26.                             curATag.click();    
  27.                             curATag.click();    
  28.                             curATag.IHTMLElement_className = " x-tab-strip-over x-tab-strip-active";    
Only tabs get activated but tab information is not diplayed please anybody help me
 
Thanks and Regards,
Yogesh