Jump to content

Open page - fill login and password


Recommended Posts

I am trying to open the page shown below fill in the employee ID, password, and the Domain pull down edit box. (Obviously I have not given my real password) I can not get it to work and I am not sure why?

BTW :I am a newbie!

one other question how can I open it up (as an alternative) if I want to use Mozilla firefox rather than Internet Explorer?

Russ

#include <IE.au3>

$sURL = "https://time.urscorp.com/DeltekTC/"

$sEmployeeID = "236546"

$sPassword = "apple"""

$sDomain = "PDURSDIV"

$oIE = _IECreate($sURL)

$oForm = _IEFormGetCollection($oIE, 0)

$oEmplID = _IEFormElementGetObjByName($oForm, "uid")

$oPass = _IEGetObjById($oForm, "passField")

$oDomain = _IEFormElementGetObjByName($oForm, "sltdom")

sleep(1000)

_IEFormElementSetValue($oEmplID, $sEmployeeID)

sleep(1000)

_IEFormElementSetValue($oPass, $sPassword)

sleep(8000)

_IEFormElementOptionselect($oDomain, $sDomain, 1, "byText")

_IEFormSubmit($oForm)

Link to comment
Share on other sites

I am trying to open the page shown below fill in the employee ID, password, and the Domain pull down edit box. (Obviously I have not given my real password) I can not get it to work and I am not sure why?

BTW :I am a newbie!

one other question how can I open it up (as an alternative) if I want to use Mozilla firefox rather than Internet Explorer?

Russ

#include <IE.au3>

$sURL = "https://time.urscorp.com/DeltekTC/"

$sEmployeeID = "236546"

$sPassword = "apple"""

$sDomain = "PDURSDIV"

$oIE = _IECreate($sURL)

$oForm = _IEFormGetCollection($oIE, 0)

$oEmplID = _IEFormElementGetObjByName($oForm, "uid")

$oPass = _IEGetObjById($oForm, "passField")

$oDomain = _IEFormElementGetObjByName($oForm, "sltdom")

sleep(1000)

_IEFormElementSetValue($oEmplID, $sEmployeeID)

sleep(1000)

_IEFormElementSetValue($oPass, $sPassword)

sleep(8000)

_IEFormElementOptionselect($oDomain, $sDomain, 1, "byText")

_IEFormSubmit($oForm)

This sounds awfully familiar... so does the answer... and the reason yours doesn't work...

:D

P.S. Mozilla (Firefox, Thunderbird, SeaMonkey) does not expose a COM interface as IE does. Allowing external apps to manipulate the browser that way is not consistent with their security model.

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

This sounds awfully familiar... so does the answer... and the reason yours doesn't work...

:D

P.S. Mozilla (Firefox, Thunderbird, SeaMonkey) does not expose a COM interface as IE does. Allowing external apps to manipulate the browser that way is not consistent with their security model.

Also,Firefox is intended to have the same features in all the platforms,and this would cause a riot of linux lovers to destroy Mozilla Foundation in matter of seconds.

Link to comment
Share on other sites

I think now I can be more specific with what the problem might be:

The Login ID and password edit boxes seemed to be filled in Okay. The problem is selected the correct option from the popuplist pulldown

which should be "PDURSDIV" selected, so my guess it is the line:

_IEFormElementOptionselect($oDomain, $sDomain, 1, "byText")

Does it look okay to you guys?

Link to comment
Share on other sites

Does it visually get selected? What is output to the SciTe console?

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

yes from a pulldown list

From the Window Info :

ClassnameNN: InternetExplorer_TridentCmboBx1

One other possibiblity is that that password is being enter to quickly?

I remember I had a similar problem with Lotus Notes. I used something like:

If the password was "apple"

then i had

send("a")

sleep(10)

send("p")

sleep(10)

send("p")

sleep(10)

send("l")

sleep(10)

send("e")

sleep(10)

send("{ENTER}")

How would I adapt my code to suit the above?

Does it visually get selected? What is output to the SciTe console?

Dale

Edited by RussMuss
Link to comment
Share on other sites

What is output to the SciTe console?

Most likely you'll need to click on the form submit button instead of using _IEFormSubmit... see the remarks for _IEFormSubmit in the helpfile.

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

PSALTYDS-

Yes it is familar! I am using the same code that you gave me. The web page format has changed, so I am trying to adjust it to suit. -however its just not working and I can not see whats wrong even looking at the post you sent about a year ago.

Russ

This sounds awfully familiar... so does the answer... and the reason yours doesn't work...

:D

P.S. Mozilla (Firefox, Thunderbird, SeaMonkey) does not expose a COM interface as IE does. Allowing external apps to manipulate the browser that way is not consistent with their security model.

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