Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Iterate through Elements of Page
#1
I am trying to locate an element based on a given tag, attribute and value. What's the best way to do this using VB6? Is this Possible? Thanks

Code:
    tag = "span";
    attr = "innerhtml";
    value = "^" + project.Variables["facebookPageName"].Value.Replace(" ","\\ ");
    searchType = "regexp";
    findStr = "input:radio"
    
    // Find Correct Page Element
    
    HtmlElementCollection results = instance.ActiveTab.FindElementsByAttribute(tag, attr, value, searchType);
    foreach (HtmlElement res in results)
        
    {
        
        if (res.ParentElement.PreviousSibling.FirstChild.FirstChild.GetAttribute("fullTag")  == findStr )
        
        {
            project.SendInfoToLog("Element Found " + res.InnerText);
        }    
        
    }
Reply


Messages In This Thread
Iterate through Elements of Page - by maddire - 2024-01-06, 16:04:08
RE: Iterate through Elements of Page - by wila - 2024-01-08, 10:57:48
RE: Iterate through Elements of Page - by maddire - 2024-01-08, 17:36:26

Forum Jump:


Users browsing this thread: 1 Guest(s)