Jump to content

Chrome.au3 Get object by Id doesn't work


Recommended Posts

HI, this is my code

#include <Chrome.au3>

$url = ("http://tweepi.com/auth/login")
$chrome_path = ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")
$chrome = _ChromeStartup ($url, $chrome_path)

$username = ("testtest")
$getname =  ("signin_username")
local $usernamevak = _ChromeObjGetHTMLById ($getname)
_ChromeObjSetValueByName($usernamevak,$username)

i am trying to to fill in a inputbox

this is the input box

<input type="text" name="signin[username]" class="shadow_input biginput lightgray" 
title="you@example.com" id="signin_username">

the chrome browser starts but doesn't fill in the text: "testtest"

I also tried to work with "_ChromeObjGetHTMLByName" but that also failed.

With the IE.au3 version it worked well, but because chrome has allot more function i need to use chrome.

i followed all the installation steps on on this website all correctly

can somebody help me

Link to comment
Share on other sites

Not sure if what I found on google is the same UDF you are using, but did you try using "_ChromeDocWaitForExistenceByTitle" ? perhaps your script is trying to fill in the information before the page is fully loaded

thanks for reply, if used the function "sleep(5000)" before the username function  and i have used your code but it still didn't work, i have installed this udf from: '?do=embed' frameborder='0' data-embedContent>>

does anybody else has guess what is going wrong here

Edited by Arclite86
Link to comment
Share on other sites

Did you install the AutoIT extension into Chrome and AutoIT Chrome Native Messaging Host? Have you tried it with >this UDF?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

could somebody with a working chrome browser please test this code to so if the code is wrong or that i havent installed it correctly

#include <Chrome.au3>

$url = ("http://tweepi.com/auth/login")
$chrome_path = ("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe")
$chrome = _ChromeStartup ($url, $chrome_path)
_ChromeDocWaitForExistenceByTitle
$username = ("testtest")
$getname =  ("signin_username")
local $usernamevak = _ChromeObjGetHTMLById ($getname)
_ChromeObjSetValueByName($usernamevak,$username)
 

i have also installed the udf on this link '?do=embed' frameborder='0' data-embedContent>>

but it didnt work either

Edited by Arclite86
Link to comment
Share on other sites

  • 4 years later...

followed the instructions and have rechecked Chrome.au3 is in the includes but when I run examples

I get  line 1 (the path to the file) #include <Chrome.au3> 

Error:Error Opening the file.

Contimnung to look around and back check if I figure out what is wrong I'll update this.

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