Hi All,
I have used the attached OpenPPM.ahk and it worked fine.
Now the login page changed, It was changed to a Table. See the jsp debugger output new_site.txt
Now there is no elementId here, so how can I pass the username and Password to this table. Can anyone provide a sample?
Regards,
Mahesh RK.
How to pass username and Password to a Table. Topic is solved
How to pass username and Password to a Table.
- Attachments
-
- OpenPPM.ahk
- (783 Bytes) Downloaded 40 times
-
- new_site.txt
- (2.01 KiB) Downloaded 40 times
Re: How to pass username and Password to a Table.
I don't know much about this, but the following seemed to meet your description.
Code: Select all
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := True
wb.Navigate("new_site.html")
wb.document.getElementById("username").value := "Test1"
wb.document.getElementById("password").value := "Test2"
Re: How to pass username and Password to a Table.
Hi Mikey,
Thank you for your response, but when I see the source of the new page
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<form action="/idp/Authn/UserPassword" method="post">
<table>
<tr><td width="40%"><label for="username">Username:</label></td><td><input name="j_username" type="text" id="username" autocapitalize="off" /></td></tr>
<tr><td><label for="password">Password:</label></td><td><input name="j_password" type="password" id="password" /></td></tr>
<tr><td></td><td><button type="submit" value="Login" >Continue</button></td></tr>
</table></form>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
There is no getElementById in the new site.
I am getting the below error.
Thank you for your response, but when I see the source of the new page
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
<form action="/idp/Authn/UserPassword" method="post">
<table>
<tr><td width="40%"><label for="username">Username:</label></td><td><input name="j_username" type="text" id="username" autocapitalize="off" /></td></tr>
<tr><td><label for="password">Password:</label></td><td><input name="j_password" type="password" id="password" /></td></tr>
<tr><td></td><td><button type="submit" value="Login" >Continue</button></td></tr>
</table></form>
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
There is no getElementById in the new site.
I am getting the below error.
Re: How to pass username and Password to a Table.
I created a new .ahk file and pasted your command. Ran the script, but the username and password are not passed.
You can change the file location and try.
@teadrinker, Do you have any inputs?
You can change the file location and try.
@teadrinker, Do you have any inputs?
- Attachments
-
- new_site.zip
- (1.44 KiB) Downloaded 22 times
-
- Posts: 4331
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: How to pass username and Password to a Table.
For me this works:
Code: Select all
wb.document.getElementById("username").value := "MyName"
wb.document.getElementById("password").value := "MyPass"
Re: How to pass username and Password to a Table.
Hi teadrinker,teadrinker wrote: ↑23 Sep 2021, 08:49For me this works:Code: Select all
wb.document.getElementById("username").value := "MyName" wb.document.getElementById("password").value := "MyPass"
Please see the attached recording? When I run the test.ahk, the page opens but it does not pass the username or password.
I have attached test.ahk and the new_site.html page as well.
Thank you.
Regards,
Mahesh. RK
- Attachments
-
- Testing.zip
- (722.79 KiB) Downloaded 27 times
-
- Posts: 4331
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: How to pass username and Password to a Table.
For me this code works as it is:
Perhaps, something wrong with your IE settings, try resetting settings to default.
Perhaps, something wrong with your IE settings, try resetting settings to default.
Last edited by teadrinker on 24 Sep 2021, 14:48, edited 1 time in total.
Re: How to pass username and Password to a Table.
why are neither of you testing that the page is loaded n document object exists
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
-
- Posts: 4331
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: How to pass username and Password to a Table.
@tank
You are right, but in the previous version of the code there was
@MMuthu, try
You are right, but in the previous version of the code there was
Code: Select all
while wb.busy
sleep 100
Code: Select all
...
wb.Navigate("file:///C:/Testing/new_site.html")
while wb.Busy || wb.ReadyState != 4
Sleep, 100
...
Re: How to pass username and Password to a Table.
Hi Teadrinker,
Sorry to bug you.
I have reset IE. Please see the attached recording.
"while wb.Busy || wb.ReadyState != 4" had issues, so I used "while wb.busy".
Still I cannot make the username and Password auto-filled.
Are you opening the HTML file I provided? Can you provide the .ahk file you are using.
Not sure where I am making the mistake.
Thanks in advance.
Regards,
Mahesh RK.
Sorry to bug you.
I have reset IE. Please see the attached recording.
"while wb.Busy || wb.ReadyState != 4" had issues, so I used "while wb.busy".
Still I cannot make the username and Password auto-filled.
Are you opening the HTML file I provided? Can you provide the .ahk file you are using.
Not sure where I am making the mistake.
Thanks in advance.
Regards,
Mahesh RK.
- Attachments
-
- Testing.zip
- (1.85 MiB) Downloaded 24 times
-
- Posts: 4331
- Joined: 29 Mar 2015, 09:41
- Contact:
Re: How to pass username and Password to a Table. Topic is solved
No idea what the issue is.
- Attachments
-
- Testing.zip
- (184.99 KiB) Downloaded 37 times
Re: How to pass username and Password to a Table.
Hi teadrinker,
The issue seems to be very simple. When I run it as administrator, It runs successfully.
So I provided the above grants to the compiled exe file.
Thanks for your kind help.
Regards,
Mahesh RK.
The issue seems to be very simple. When I run it as administrator, It runs successfully.
So I provided the above grants to the compiled exe file.
Thanks for your kind help.
Regards,
Mahesh RK.
-
- Posts: 4331
- Joined: 29 Mar 2015, 09:41
- Contact:
Who is online
Users browsing this forum: filipemb and 286 guests