How to send "]" carac from PowerShell to Edge with SELENIUM...

0
0

Hello,

Have someone help me to send ‘]’ carac from PowerShell to Edge or Chrome via Selelnium… 🙁

$CHROME_Options = New-Object OpenQA.Selenium.Chrome.ChromeOptions  
$CHROME_Extension_Directory = @("C:\Users\XXXXXXXX\AppData\Local\Packages\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\LocalState\") 
$CHROME_Selenium_Directory = "C:\Users\XXXXXXX\OneDrive\myScripts\PrepareTorrent\Selenium\"  
$CHROME_Options.AddExtensionPaths($CHROME_Extension_Directory) $CHROME_Options.AddExtensionPath($CHROME_Extension_Directory) 
$CHROME_Options.StartPage = "YYYYYYYYYYY"  
$CHROME_Driver = New-Object OpenQA.Selenium.Chrome.ChromeDriver @( $CHROME_Selenium_Directory, $CHROME_Options ) 
Start-Sleep -s 1  
$CHROME_Driver.Url = "YYYYYYYYYYY"  
$CHROME_Driver.FindElementById("name").SendKeys(']')

I just tried to open Website, and put some text (with special carac “]” but impossible to send this one… the “[” is ok, but not close on 🙁 )

Thanks for help…

TM

  • Kae
    • Kae
    • 2 months ago
    I’ve just tested a very simple example and it worked fine: $CHROME_Driver = New-Object OpenQA.Selenium.Chrome.ChromeDriver $CHROME_Driver.Url = “file:///C:/Alkane/test.html” $CHROME_Driver.FindElementById(“name”).SendKeys(“]”) Make sure you’re using the correct version of the ChromeDriver! My version of Chrome is v84 so I downloaded v84 version of the Chrome Driver executable: https://sites.google.com/a/chromium.org/chromedriver/downloads Incidentally, my PowerShell version is also 5.1.
  • You must to post comments
Showing 0 results
Your Answer

Please first to submit.