Jump to content
Sign in to follow this  
Rigit

Curious about certain tags/id's not being in the source? - (Moved)

Recommended Posts

This may be a very basic question, but I am curious as to why some tags or id's can not be found? Sometimes I am tasked with writing a basic auto-it script to login into a website and lately it seems I am having trouble finding tags/id's to grab so my script can reference. Any reason or explanation would greatly appreciated. Also any links that you can provide would be stellar!  

Share this post


Link to post
Share on other sites

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:

Quote

General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.


Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Ok, let me see if I can try to explain this better. On most sites it very simple to grab an element id and use that for your auto-it script, so you automate logging in. However, I ran into certain web-pages for instance a Cisco web login recently and for the life of me I could not find an element id. Which made automating a bit more tricky. I am just curious as to why I could not find an element id for a login page?

Thanks for moving this to the right channel!

 

Edited by Rigit

Share this post


Link to post
Share on other sites

@Rigit Check the form elements using IE's developer toolbox. You can also run this JavaScript in the console to list all elements with IDs:

document.querySelectorAll('[id]')

If you still could not find the IDs of the required elements then you may have to do some tricky coding and potentially utilize JavaScript for the task...


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

Thank you,  @TheDcoder  so I don't know if you would know, but is there any reading or explanation for how to do this on web-page.  I am trying to also understand why and how its done as well. Once again thank you for the tip!

Share this post


Link to post
Share on other sites

@Rigit This article shows how to open the dev toolbox: https://www.isunshare.com/windows-10/3-ways-to-open-developer-tools-in-ie-on-windows-10.html

Quote

3 ways to open Developer Tools in IE on Windows 10:

Way 1: Open them by keyboard shortcut.

When the Internet Explorer is launched, press F12 on the keyboard.

Way 2: Open Developer Tools via the Tools icon.

In IE, click the top-right Tools icon, and choose F12 Developer Tools in the list.

tap-tools-icon-and-hit-f12-developer-tools.png

Way 3: Open them in the Tools menu.

Select Tools on the menu bar in IE, and then tap F12 Developer Tools in the options.

open-tools-and-tap-f12-developer-tools.png

After opening the toolbox, switch to the "Console" tab and you will see that it has an input area for JavaScript code. You can try pasting my code snippet there and press enter, it should output a list of elements which you can interactively browse and select :)


A cross-platform implementation of the AutoIt language

My contributions to the AutoIt Community ##AutoIt at freenode, real-time chat

3fHNZJ.gif

Spoiler

If I have hurt or offended you in anyway, Please accept my apologies, I never (regardless of the situation) intend to do that to anybody.

Share this post


Link to post
Share on other sites

Some websites hide elements in a <div> class or ID... referenced only by CSS. 
So you would need to view the CSS in order to see what is actually happening.
In other cases, the jQuery or JavaScript is responsible for handling certain elements. 

 


Kind Regards
Skeletor

"I need coffee to turn me back to a human"

Microsoft Office Splash Screen | Basic Notepad Program (Beginner) | Transparent Splash Screen

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...