Results 1 to 6 of 6

Thread: I can't click Webbrowser's Element

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2017
    Posts
    13

    I can't click Webbrowser's Element

    I want to click one <div> but I couldn't click it with my standart code. You need to press F12 and select mobile emulator to see this mobile version of website. After then you can click button manually but you can't click it programmatically. I can't use API so I need to do it with web elements. Please help...

    This is my standart code;
    Code:
    For Each obj1 In WebBrowser1.Document.GetElementsByTagName("div")
                If (obj1.GetAttribute("class") = "_o5rm6 coreSpriteCameraInactive") Then
                    obj1.Click: Exit For
                End If
                Next
    This is the button where I want to click;
    Name:  Adsız.png
Views: 287
Size:  25.5 KB

    This site is instagram... Help me...

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,474

    Re: I can't click Webbrowser's Element

    Instagram has an actual API if you want to automate things, have you considered that rather than trying to fake interaction with the web interface? I would also check if automating the web interface is allowed by Instagram's T&Cs as well.

  3. #3
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: I can't click Webbrowser's Element

    I'm not sure why scrape kiddies think this is a "recipe" site for their infringing activities. VB already has a bad enough name through simple prejudice. Harboring this sort of thing doesn't help the image a bit.

    Terms of Use

    General Conditions

    10. We prohibit crawling, scraping, caching or otherwise accessing any content on the Service via automated means, including but not limited to, user profiles and photos (except as may be the result of standard search engine protocols or technologies used by a search engine with Instagram's express consent).

  4. #4
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,474

    Re: I can't click Webbrowser's Element

    Quote Originally Posted by dilettante View Post
    I'm not sure why scrape kiddies think this is a "recipe" site for their infringing activities. VB already has a bad enough name through simple prejudice. Harboring this sort of thing doesn't help the image a bit.

    Terms of Use
    As much as the blatant disregard for the T&Cs in this kind of post annoys me the thing that really gets to me is the constant insistence on trying to implement a dodgy hack that is completely unsupported while utterly avoiding a published, documented, and supported way to do things.

  5. #5
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: I can't click Webbrowser's Element

    Even when you don't care about the rights of the site operator, when you get something like this to work even a minor change to the site can break your program.

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    Re: I can't click Webbrowser's Element

    Seeing how this thread is a direct violation of both Instagram's and VBForums terms of service (Acceptable Use Policy), it has been closed for further discussion as its not allowed on the Forums.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width