- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
12-09-2025 02:17 PM
Hello,
the Idea here to create a Connection components that login automatically, entries some data to generate a token then copy said token automatically into a Clipboard (token should also be displayed inside a box). No need to show the Chrome webpage.
Lets say we have this webpage https://practicetestautomation.com/practice-test-login/
I log in with
WebFormFields:
username>{Username}(SearchBy=id)
password>{Password}(SearchBy=id)
submit>(Button)(SearchBy=id)
after login I'm here:
I want to copy "Logged In Successfully" (or any dynamic text here) inside a box message
( so in this case I want to copy the text inside <h1 class="post-title">Logged In Successfully</h1> or //*[@id="loop-container"]/div/article/div[1]/h1).
My Questions:
Thank you very much
12-10-2025 07:23 AM
Short answer: No — .INI files cannot perform extract web text or copy to clipboard.
However, You may try .ini file and Autoit to perform your required actions.
Sample code of Autoit as per your requirements:
#include "Selenium.au3"
#include <MsgBoxConstants.au3>
#include <Clipboard.au3>
; ================================
; READ FROM INI
; ================================
Local $url = IniRead("config.ini", "Login", "url", "")
Local $username = IniRead("config.ini", "Login", "username", "")
Local $password = IniRead("config.ini", "Login", "password", "")
Local $selUser = IniRead("config.ini", "Selectors", "username", "")
Local $selPass = IniRead("config.ini", "Selectors", "password", "")
Local $selSubmit = IniRead("config.ini", "Selectors", "submit", "")
Local $selResult = IniRead("config.ini", "Selectors", "result", "")
; ================================
; START CHROME HEADLESS
; ================================
Local $ChromeOptions = _Selenium_CreateOptions()
_Selenium_OptionsAddArgument($ChromeOptions, "--headless=new")
_Selenium_OptionsAddArgument($ChromeOptions, "--disable-gpu")
Local $driver = _Selenium_Start("chrome", $ChromeOptions)
; ================================
; OPEN PAGE
; ================================
_Selenium_Navigate($driver, $url)
Sleep(1000)
; ================================
; LOGIN
; ================================
Local $eUser = _Selenium_FindElement($driver, $selUser)
_Selenium_ElementSendKeys($eUser, $username)
Local $ePass = _Selenium_FindElement($driver, $selPass)
_Selenium_ElementSendKeys($ePass, $password)
Local $eSubmit = _Selenium_FindElement($driver, $selSubmit)
_Selenium_ElementClick($eSubmit)
Sleep(2000)
; ================================
; EXTRACT RESULT TEXT
; ================================
Local $eResult = _Selenium_FindElement($driver, $selResult)
Local $resultText = _Selenium_ElementGetText($eResult)
; ================================
; COPY TO CLIPBOARD
; ================================
_Clipboard_SetData($resultText)
; ================================
; SHOW IN MESSAGE BOX
; ================================
MsgBox($MB_ICONINFORMATION, "Result Copied", "Extracted Text:" & @CRLF & @CRLF & $resultText)
; QUIT DRIVER
_Selenium_Quit($driver)
12-10-2025 07:23 AM
Short answer: No — .INI files cannot perform extract web text or copy to clipboard.
However, You may try .ini file and Autoit to perform your required actions.
Sample code of Autoit as per your requirements:
#include "Selenium.au3"
#include <MsgBoxConstants.au3>
#include <Clipboard.au3>
; ================================
; READ FROM INI
; ================================
Local $url = IniRead("config.ini", "Login", "url", "")
Local $username = IniRead("config.ini", "Login", "username", "")
Local $password = IniRead("config.ini", "Login", "password", "")
Local $selUser = IniRead("config.ini", "Selectors", "username", "")
Local $selPass = IniRead("config.ini", "Selectors", "password", "")
Local $selSubmit = IniRead("config.ini", "Selectors", "submit", "")
Local $selResult = IniRead("config.ini", "Selectors", "result", "")
; ================================
; START CHROME HEADLESS
; ================================
Local $ChromeOptions = _Selenium_CreateOptions()
_Selenium_OptionsAddArgument($ChromeOptions, "--headless=new")
_Selenium_OptionsAddArgument($ChromeOptions, "--disable-gpu")
Local $driver = _Selenium_Start("chrome", $ChromeOptions)
; ================================
; OPEN PAGE
; ================================
_Selenium_Navigate($driver, $url)
Sleep(1000)
; ================================
; LOGIN
; ================================
Local $eUser = _Selenium_FindElement($driver, $selUser)
_Selenium_ElementSendKeys($eUser, $username)
Local $ePass = _Selenium_FindElement($driver, $selPass)
_Selenium_ElementSendKeys($ePass, $password)
Local $eSubmit = _Selenium_FindElement($driver, $selSubmit)
_Selenium_ElementClick($eSubmit)
Sleep(2000)
; ================================
; EXTRACT RESULT TEXT
; ================================
Local $eResult = _Selenium_FindElement($driver, $selResult)
Local $resultText = _Selenium_ElementGetText($eResult)
; ================================
; COPY TO CLIPBOARD
; ================================
_Clipboard_SetData($resultText)
; ================================
; SHOW IN MESSAGE BOX
; ================================
MsgBox($MB_ICONINFORMATION, "Result Copied", "Extracted Text:" & @CRLF & @CRLF & $resultText)
; QUIT DRIVER
_Selenium_Quit($driver)
12-13-2025 06:45 PM
@sanjay sah
Thank you appreciated! I will try it
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

