give credentials like key press from console",
"item":"https://forum.tuteehub.com/forum/web-technologies-153/web-development-301/login-website-give-credentials-like-key-press-from-console-94887"
}
]
}
-->
give credentials like key press from console ',
"answerCount": 2,
"upvoteCount": 2,
"dateCreated": "2022-08-16T06:13+05:30",
"author": {
"@type": "Person",
"name": "TuteeHUB",
"url": "https://forum.tuteehub.com/forum/web-technologies-153/web-development-301/login-website-give-credentials-like-key-press-from-console-94887"
},
"acceptedAnswer": {
"@type": "Answer",
"text": "{"id":131644,"user_id":8,"qa_id":94887,"answer_id":0,"answer":"_x000D_\nIf you have to send a keystroke, you could use the SendKeys function.\nI've used this is scripts before, but have found it more reliable if you incorporate PSCX's Set-ForegroundWindow cmdlet as well to make sure your browser or app is the currently focused application:\n\n $Shell = New-Object -COM \u00e2\u20ac\u0153WScript.Shell\u00e2\u20ac\u009d\n $Shell.SendKeys(\u00e2\u20ac\u0153F15\u00e2\u20ac\u009d)\n\n\nWould send a F15 keystroke.\n\nHope that gives you a place to start from.\n\nThere's another 3rd party module out in the wild called WASP that you could install.\n\nhttps:\/\/wasp.codeplex.com\/\n\nAlso, Adam Driscoll wrote a Powershell module that wraps Selenium's C# WebDriver:\n\nhttps:\/\/github.com\/adamdriscoll\/selenium-powershell\n ","credit":0,"created_at":"2022-08-16T00:49:07.000000Z","updated_at":"2022-08-16T00:49:07.000000Z"}",
"dateCreated": "2022-08-16T06:13+05:30",
"upvoteCount": 2,
"url": "https://forum.tuteehub.com/forum/web-technologies-153/web-development-301/login-website-give-credentials-like-key-press-from-console-94887",
"author": {
"@type": "Person",
"name": "TuteeHUB",
"url": "https://forum.tuteehub.com/forum/web-technologies-153/web-development-301/login-website-give-credentials-like-key-press-from-console-94887"
}
},
"suggestedAnswer": [
{
"@type": "Answer",
"text": "{"id":131644,"user_id":8,"qa_id":94887,"answer_id":0,"answer":"_x000D_\nIf you have to send a keystroke, you could use the SendKeys function.\nI've used this is scripts before, but have found it more reliable if you incorporate PSCX's Set-ForegroundWindow cmdlet as well to make sure your browser or app is the currently focused application:\n\n $Shell = New-Object -COM \u00e2\u20ac\u0153WScript.Shell\u00e2\u20ac\u009d\n $Shell.SendKeys(\u00e2\u20ac\u0153F15\u00e2\u20ac\u009d)\n\n\nWould send a F15 keystroke.\n\nHope that gives you a place to start from.\n\nThere's another 3rd party module out in the wild called WASP that you could install.\n\nhttps:\/\/wasp.codeplex.com\/\n\nAlso, Adam Driscoll wrote a Powershell module that wraps Selenium's C# WebDriver:\n\nhttps:\/\/github.com\/adamdriscoll\/selenium-powershell\n ","credit":0,"created_at":"2022-08-16T00:49:07.000000Z","updated_at":"2022-08-16T00:49:07.000000Z"}",
"dateCreated": "2022-08-16T06:13+05:30",
"upvoteCount": 2,
"url": "https://forum.tuteehub.com/forum/web-technologies-153/web-development-301/login-website-give-credentials-like-key-press-from-console-94887",
"author": {
"@type": "Person",
"name": "AnotherUser",
"url": "https://forum.tuteehub.com/forum/web-technologies-153/web-development-301/login-website-give-credentials-like-key-press-from-console-94887"
}
}
]
}
}
-->
Posted on 16 Aug 2022, this text provides information on Web Development related to Web Technologies. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
_x000D_
If you have to send a keystroke, you could use the SendKeys function.
I've used this is scripts before, but have found it more reliable if you incorporate PSCX's Set-ForegroundWindow cmdlet as well to make sure your browser or app is the currently focused application:
$Shell = New-Object -COM “WScript.Shellâ€
$Shell.SendKeys(“F15â€)
Would send a F15 keystroke.
Hope that gives you a place to start from.
There's another 3rd party module out in the wild called WASP that you could install.
https://wasp.codeplex.com/
Also, Adam Driscoll wrote a Powershell module that wraps Selenium's C# WebDriver:
https://github.com/adamdriscoll/selenium-powershell
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that
you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice
sessions to improve your knowledge and scores.
manpreet
Best Answer
2 years ago
_x000D_ If you have to send a keystroke, you could use the SendKeys function. I've used this is scripts before, but have found it more reliable if you incorporate PSCX's Set-ForegroundWindow cmdlet as well to make sure your browser or app is the currently focused application: $Shell = New-Object -COM “WScript.Shell†$Shell.SendKeys(“F15â€) Would send a F15 keystroke. Hope that gives you a place to start from. There's another 3rd party module out in the wild called WASP that you could install. https://wasp.codeplex.com/ Also, Adam Driscoll wrote a Powershell module that wraps Selenium's C# WebDriver: https://github.com/adamdriscoll/selenium-powershell