-
Notifications
You must be signed in to change notification settings - Fork 131
Downloading and running Selenium Grid with Powershell
Jakub Raczek edited this page Apr 30, 2019
·
2 revisions
Download, start in background and stop Selenium Grid with Powershell
Selenium Grid must be downloaded to the folder with Selenium Drivers. More details here
$url = 'http://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar'
$grid = 'selenium-server-standalone-3.141.59.jar'
$output = ".\Ocaramba.Tests.NUnit\bin\Release\$grid"
$outputLogs = ".\Ocaramba.Tests.NUnit\bin\Release\"
$start_time = Get-Date
echo "Downloading Selenium Grid from:" $url
(New-Object System.Net.WebClient).DownloadFile($url, $output)
echo "Selenium Grid downloaded to:" $output
echo "Time taken to download $($grid): $((Get-Date).Subtract($start_time).Seconds) second(s)"
echo '********************************Start Selenium Grid in background****************************************'
$appHub=Start-Process java -ArgumentList '-jar', $output' -role hub' -RedirectStandardOutput $outputLogs'console_hub.out' -RedirectStandardError $outputLogs'console_hub.err' -passthru`
Start-Sleep -s 5
echo "Selenium Grid hub started"
$appNode=Start-Process java -ArgumentList '-jar', $output' -role node -hub http://localhost:4444/grid/register' -RedirectStandardOutput $outputLogs'console_node.out' -RedirectStandardError $outputLogs'console_node.err' -passthru
Start-Sleep -s 5
echo '*****************************Stop Selenium Grid****************************'
echo "Stop Selenium Grid node"
Stop-Process -Id $appNode.Id
echo "Stop Selenium Grid hub"
Stop-Process -Id $appHub.Id
- Home
- Getting started
- Parallel tests execution
- MsTest DataDriven tests from Xml and CSV files
- NUnit DataDriven tests from Xml, CSV and Excel files
- Comparing files by NUnit DataDriven tests
- Visual Testing
- Screen shots: full desktop, selenium. PageSource saving
- Verify-asserts without stop tests
- Downloading files
- Helpers
- Override browser profile preferences, install browser extensions, Headless mode
- Debugging Test.Automation framework
- Logging
- Performance measures
- Webdriver Extends
- More common locators
- Selenium-Grid-support
- Advanced Browser Capabilities and Options
- AngularJS synchronization
- Update App.config or appsettings.json
- Cross browser parallel test execution with testing-Cloud-Providers\SeleniumGrid
- Verifying Javascript Errors from browser
- Enabling Performance Log for Chrome
- Azure DevOps Support
- Edge browser Support
- Downloading and running Selenium Grid with Powershell
- Run Ocaramba tests with Docker container
- HTTP auth in Internet explorer
- ExtentReports Support