Profile cover photo
Profile photo
Yogesh Bhole
89 followers
89 followers
About
Yogesh's posts

Post has attachment
First matching record using XPATH query
In order to select first matching record found using XPATH query I used (//div[@class='container']//h1[@class='page-header'])[1]   instead of //div[@class='container']//h1[@class='page-header'][1]

Post has attachment
Web Request using PowerShell and Parse JSON response as PowerShell object
To send web request and read JSON response using PowerShell I used following commands $response = Invoke-WebRequest -Uri "http://myserver.com" -Method Get -Headers @{"apikey"="toekn"} $responseAsPSObject = $response.Content | ConvertFrom-Json $myValue = $re...

Post has attachment
Stop IIS Apppool only when it is Started using appcmd
In order to stop IIS apppool using appcmd only when apppool is started I used following command %windir%\system32\inetsrv\appcmd list apppool /name:MyAppPoolName /state:Started /xml | %windir%\system32\inetsrv\appcmd stop apppool /in

Post has attachment
Robocopy exit code 0
In order Robocopy to exit code 0, I used following (robocopy C:\Source D:\Destionation /e /move /np /njh /njs) ^& IF %ERRORLEVEL% LEQ 4 exit /B 0

Post has attachment
Get text from the textbox using Selenium 2.0
In order to get text from the textbox using Selenium 2.0 I used following String myText = driver.FindElement(By.XPath("//input[@id='myTextBox']")).GetAttribute("value");

Post has attachment
Get parameter and enviornment variable in Jenkins 2.0 Pipeline job's Groovy script
In order to get Pipeline job parameter (defined by user) in the Groovy script I used following ${ENV:environment} while to get enviornment variables to the Pipeline job I used following $env.BUILD_NUMBER

Post has attachment
Allow HTML report containing inline scripts and styles in Jenkins
In Order Jenkins to display HTML reports which uses JS and CSS, I executed following command from Manage Jenkins => Scripe Console System.setProperty("hudson.model.DirectoryBrowserSupport.CSP","sandbox allow-scripts allow-same-origin; default-src 'self'; sc...

Post has attachment
Find all NUnit test assemblies recursively and run them using PowerShell
In order to grab all unit tests assemblies recursively within folder and run them using NUnit I used following PowerShell script. Here I am filtering assemblies found in obj folder. $nunit = "C:\Program Files (x86)\NUnit 2.6.4\bin\nunit-console.exe" $assemb...

Post has attachment
Execute MS SQL commands from PowerShell
In order to execute MS SQL commands from PowerShell I used following script. $sqlquery=@" USE [DBName] GO select * from table "@ Invoke-Sqlcmd -ServerInstance "ServerName" -Query $sqlquery -Verbose

Post has attachment
Get Substring from nAnt property
In order to get sub-string of the nAnt property, to be used in xmlpoke for nAnt I used following statement. Besides the sub-string the following statement also returns the upper case of the string. Here GIT.Commit is the nAnt property. <xmlpoke file="my.con...
Wait while more posts are being loaded