bluebug

Tree HTML

12 posts in this topic

Hi guys, i need a help.

I'm to do automation , i take ids of the webpage with inspect of google chrome .

But show errors  following  the pictures :

<div class="x-dock-panel x-layout-panel-hd-text x-dock-panel-title-text" id="ext-gen215" style="background-image: url(&quot;imgs/hemera/tree/icn_grupoa.png&quot;); background-repeat: no-repeat; background-position: 3px 50%; padding-left: 23px;">Grupo A</div>

 

Can Someone help me?
Please

 

Log1.png

tela.png

Share this post


Link to post
Share on other sites



how you use _IEGetObjById()   ? - Show your code snippet.


NEW:     ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2016-11-12
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 Components * TeamViewer API -UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

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 * Best coding practices * 

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 *

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 *

"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."

 

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Folliwing my code:

#include <IE.au3>
#include <ScreenCapture.au3>
#include <File.au3>
#include <AutoItConstants.au3>


;Variaveis para acesso ao sistema
Dim $link
Dim $login
Dim $senha
Dim $oIE

;Variaveis para função de print
Dim $eviden
Dim $nimg
Dim $opcao

FAcessa()
FBusca()


;Criando Função de FAcessa
Func FAcessa()
  ;Lendo dados de configuração de acesso
   $file = "\\monaco\QualidadeSoftware\Automação\Configuração\RelatorioConsumo.conf"
   FileOpen($file, 0)

   For $i = 1 to _FileCountLines($file)
      $line = FileReadLine($file, $i)

   Next
   FileClose($file)

   ;Split para quebrar linha com a massa de dados
   $dados=StringSplit($line, "|")
   ;Setando variaveis de acesso
    $link=$dados[1]
    $login=$dados[2]
    $senha=$dados[3]
    $eviden=$dados[4]

   ;abrinfo navegador
    $oIE = ObjCreate("{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
   _IENavigate($oIE, $link)
   $oIE.visible = 2
   WinSetState("", "",  @SW_MAXIMIZE);
   $Name = _IEGetObjById($oIE, "ext-comp-1001")
   $Email = _IEGetObjById($oIE, "ext-comp-1002")
   $Click = _IEGetObjById($oIE, "ext-gen43")

   _IEFormElementSetValue($Name,'admin')
   _IEFormElementSetValue($Email,'admin')
   _IEAction($Click,'Click')
   Sleep(3000)
EndFunc


Func FBusca()
   $GrupoA1 = _IEGetObjById($oIE,"ext-gen212")
   _IEAction($GrupoA1,'Click')
 
EndFunc

 

 

Edited by Melba23
Added code tags

Share this post


Link to post
Share on other sites

bluebug,

When you post code please use Code tags - see here how to do it.  Then you get a scrolling box and syntax colouring as you can see above now I have added the tags.

M23


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

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites
#include <IE.au3>
#include <ScreenCapture.au3>
#include <File.au3>
#include <AutoItConstants.au3>

;Variaveis para acesso ao sistema
Dim $link
Dim $login
Dim $senha
Dim $oIE

;Variaveis para função de print
Dim $eviden
Dim $nimg
Dim $opcao

FAcessa()
FBusca()
;Criando Função de FAcessa
Func FAcessa()
  ;Lendo dados de configuração de acesso
   $file = "\\monaco\QualidadeSoftware\Automação\Configuração\RelatorioConsumo.conf"
   FileOpen($file, 0)

   For $i = 1 to _FileCountLines($file)
      $line = FileReadLine($file, $i)

   Next
   FileClose($file)

   ;Split para quebrar linha com a massa de dados
   $dados=StringSplit($line, "|")
   ;Setando variaveis de acesso
    $link=$dados[1]
    $login=$dados[2]
    $senha=$dados[3]
    $eviden=$dados[4]

   ;abrinfo navegador
    $oIE = ObjCreate("{D5E8041D-920F-45e9-B8FB-B1DEB82C6E5E}")
   _IENavigate($oIE, $link)
   $oIE.visible = 2
   WinSetState("", "",  @SW_MAXIMIZE);
   $Name = _IEGetObjById($oIE, "ext-comp-1001")
   $Email = _IEGetObjById($oIE, "ext-comp-1002")
   $Click = _IEGetObjById($oIE, "ext-gen43")

   _IEFormElementSetValue($Name,'admin')
   _IEFormElementSetValue($Email,'admin')
   _IEAction($Click,'Click')
   Sleep(3000)
EndFunc


Func FBusca()
   $GrupoA1 = _IEGetObjById($oIE,"ex-gen212") 
   _IEAction($GrupoA1,'Click')
  
EndFunc

 

Sorry, i'm new in here.
I did not know.

Share this post


Link to post
Share on other sites

bluebug,

No problem.

M23


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

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

Share this post


Link to post
Share on other sites
51 minutes ago, bluebug said:

$GrupoA1 = _IEGetObjById($oIE,"ex-gen212")

"ex-gen212" ? 


I'm wondering if this "ext-gen212" element still exist after login, in the same document object.
Specifying: whether it is inside the frame ?

 


NEW:     ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2016-11-12
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 Components * TeamViewer API -UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

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 * Best coding practices * 

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 *

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 *

"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."

 

Share this post


Link to post
Share on other sites

Yes, this inside frame.

Why?

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

First you should get Frame with _IEFrameGetObjByName()
Next you should use this Frame as Document:
 

$GrupoA1 = _IEGetObjById($oIEFrame,"ext-gen212")

 

EDIT:  btw. what value for src atribute is used in this frame ?
If this is document on different URL then you can not access this document (because of security reason).

 

Edited by mLipok

NEW:     ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2016-11-12
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 Components * TeamViewer API -UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

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 * Best coding practices * 

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 *

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 *

"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."

 

Share this post


Link to post
Share on other sites

#10 ·  Posted

Ok  I understand , but  i don't know how to do.

Look, is code of the web page .

How i could to do?

In attachment the code of web page.

 

index.zip

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Local $oIEFrame = _IEGetObjByName($oIE, 'pg_inicial_iframe')
$GrupoA1 = _IEGetObjById($oIEFrame,"ext-gen212")

 

Edited by mLipok

NEW:     ADO.au3 UDF     POP3.au3 UDF     XML.au3 UDF    How to use IE.au3  UDF with  AutoIt v3.3.14.x  for other useful stuff click the following button:

Spoiler

Last update: 2016-11-12
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 Components * TeamViewer API -UDF * JavaManagement UDF * VIES over SOAPPOP3.au3 UDF *  RTF Printer - UDF * XML.au3 - BETA * ADO.au3 UDF SMTP Mailer UDF * WinSCP UDF *

My contribution to others projects: * _sql.au3 UDF  *

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 * Best coding practices * 

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 *

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 *

"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."

 

Share this post


Link to post
Share on other sites

#12 ·  Posted

Ok , It worked brother! :lmao:

I Have a last question, for access the sub - elements i need to do like this?

Local $oIEFrame = _IEGetObjByName($oIE, 'pg_inicial_iframe') 
$GrupoA1 = _IEGetObjById($oIEFrame,"ext-gen212")
_IEAction($GrupoA1,"Click")

Local $oLupa = _IEGetObjById($GrupoA1,"ext-gen116")
_IEAction($oLupa,"Click")

This is Correct?

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