Jump to content

Stuck, helppp, objects in IE


Recommended Posts

Hello, I have a script which should open IE, sign into the "obvibase.com" via gmail  and it does......but the problem begins after singing in--I can't make any of those objects (on the "obvibase.com") stick to variable because they don't have id or name and I tried like million different functions and ways but it seems that they didn't work for me or I was to stupid to use them..now I'm desperate and I would appreciate if someone could solve this problem, I have the latest version of IE and AutoIt... 
sorry for bad english, it's my foreign language 

picture is just an example, the whole webpage is like that..

 

Untitled.png

Edited by atom
Link to comment
Share on other sites

I've tried a function that someone on forum has posted, didn't work 

I've tried with the _ieformelementgetcollection and a sort of a loop with classname and it just keep sending errors, nomatch etc.. 

can someone PLEASE just simply send me a solution that actually works on that webpage ? I'm "working" on that problem for more than a week -.-''' 

a.png

Link to comment
Share on other sites

Are you sure this has a form you can get a collection from?

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

View the page source and look for an <form> tags.

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

there are probably no forms in the site you try to read, so how do you test? well, you can try _IEFormGetCollection autoit help, in your script double click the word then when it is highlighted you pres f1 and help will open and take you direly to help file of that function,

the Testing below was taken from that example, in did use the demo site of the site you talk about not the URL you tested with so be aware of that
the result on this one is there are no forms

#include <IE.au3>
;~ ;TEST IF THERE ARE FORMS
Local $oIE = _IECreate("https://www.obvibase.com/demo#table/NrfPOfh6LSiV/*")
Local $oForms = _IEFormGetCollection($oIE)
Local $iNumForms = @extended
MsgBox(0, "Forms Info", "There are " & $iNumForms & " forms on this page")
Local $oForm
For $i = 0 To $iNumForms - 1
    $oForm = _IEFormGetCollection($oIE, $i)
    MsgBox(0, "Form Info", $oForm.name)
Next

now if that one does not work then try to search for similar functions in autoit help, i come up with _IETagNameAllGetCollection, im not sure what you want to do but with this example I get at least the text out of the cells

#include <IE.au3>

$StoIE = _IECreate("https://www.obvibase.com/demo#table/NrfPOfh6LSiV/*",0,1,1,0)
Local $iData = _IETagNameAllGetCollection($StoIE)
if not @error then
    For $i in $iData
        
        ;Display in console only elements(or however you call this) with 'ob-cell-text' in its classname
        if $i.classname = 'ob-cell-text' Then   ;pay atention here
            ;ConsoleWrite("$i.innerText:"&$i.innerText&@crlf)
            ConsoleWrite("$i.classname:"&$i.classname&@crlf)
            ;ConsoleWrite("$i.tagname:"&$i.tagname&@crlf)
            ;ConsoleWrite("$i.id:"&$i.id&@crlf)
            ConsoleWrite("$i.innerhtml:"&$i.innerhtml&@crlf)
            ConsoleWrite(" "&@crlf)
        EndIf
        
        ;Display in console only elements(or however you call this) with 'ob-cell-content' in its classname
        if $i.classname = 'ob-cell-content' Then
            ;ConsoleWrite("$i.innerText:"&$i.innerText&@crlf)
            ConsoleWrite("$i.classname:"&$i.classname&@crlf)
            ;ConsoleWrite("$i.tagname:"&$i.tagname&@crlf)
            ;ConsoleWrite("$i.id:"&$i.id&@crlf)
            ConsoleWrite("$i.innerhtml:"&$i.innerhtml&@crlf)
            ConsoleWrite(" "&@crlf)
            ConsoleWrite("###############################:1:"&@crlf)
        EndIf

    Next
EndIf
_IEQuit($StoIE)

EDIT: was boring and played around with IE, try this script below, the cells actually have an id so you can detect them by obj id, look at your screenshot the highlighted text above it is the Object id, it is ":14.cell.2.4" test example below, Good luck

#include <IE.au3>

;~ $StoIE = _IECreate("https://www.obvibase.com/demo#table/NrfPOfh6LSiV/*",0,1,1,0)
$StoIE = _IECreate("https://www.obvibase.com/demo#table/NrfPOfh6LSiV/*",1,1,1,0);try to attach instead of opening a new one

Local $oDiv = _IEGetObjById($StoIE, ":13.cell.1.2")

$text = _IEPropertyGet($oDiv,'innertext') ;$oDiv is the obj id :13.cell.1.2
ConsoleWrite("$text="&$text&@crlf)
if $oDiv.innertext = @crlf&'Jane' then Consolewrite("@crlf detected infront of Jane?"&@crlf)

;options
$oDiv.innertext = 'Jane2'
sleep(1000)
_IEPropertySet($oDiv,'innertext',  'Jane3')

any one can tell me why i mess up the cell with the new text? it's not a clickable cell after i modify it with my example

Edited by jvds
was boring XD
Link to comment
Share on other sites

the first part of code that you have given me shows that there are 0 forms on the webpage, that probably means I'm screwed ? 
the second part of code that you have given me does absolutely nothing ? I don't know how to use any of those console functions but I've copied that code and there are simply no results and no errors 

Link to comment
Share on other sites

Works fine for me.

$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="39">Text</div><div class="ob-cell-dropdown" abp="40"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Text
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="45">Choice</div><div class="ob-cell-dropdown" abp="46"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Choice
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="51">Number</div><div class="ob-cell-dropdown" abp="52"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Number
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="57">*2 =</div><div class="ob-cell-dropdown" abp="58"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:*2 =
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="63">Checkbox</div><div class="ob-cell-dropdown" abp="64"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Checkbox
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 78px;" abp="69">Files in Drive</div><div class="ob-cell-dropdown" abp="70"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Files in Drive
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 101px;" abp="75">Files in Dropbox</div><div class="ob-cell-dropdown" abp="76"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Files in Dropbox
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 77px;" abp="81">Nested table</div><div class="ob-cell-dropdown" abp="82"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Nested table
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="99">John</div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:John
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="102">Red</div><div class="ob-cell-dropdown" abp="103"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Red
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="106">$15.00</div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:$15.00
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="109">$30.00</div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:$30.00
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 87px;" abp="121"><a href="#table/NrfPOfh6LSiV/1/7/*" abp="122">3 records</a></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:<a href="#table/NrfPOfh6LSiV/1/7/*" abp="122">3 records</a>
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="133">Jane</div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Jane
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 60px;" abp="137">Yellow</div><div class="ob-cell-dropdown" abp="138"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:Yellow
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="142">$20.00</div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:$20.00
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="146">$40.00</div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:$40.00
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 87px;" abp="162"><a href="#table/NrfPOfh6LSiV/2/7/*" abp="163">2 records</a></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:<a href="#table/NrfPOfh6LSiV/2/7/*" abp="163">2 records</a>
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="172"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="175"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="178"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="181"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 70px;" abp="184"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 88px;" abp="187"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 111px;" abp="190"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:
 
$i.classname:ob-cell-content
$i.innerhtml:<div class="ob-cell-text" style="max-width: 87px;" abp="193"></div>
 
###############################:1:
$i.classname:ob-cell-text
$i.innerhtml:

 

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

@atom

Please read this Wiki Page about posting code.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Don't bother guys, I found solution finally - another webpage, this one has frustrated me too long.... thanks for your help anyway ;) if anyone is curious it's sadodb.com

Edited by atom
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...