These four letters can drive you crazy if you are having a bad day using Webdriver...
Thus if you are reading this article you are already in the middle of one bad bad day...thus I'll cut the crap and go directly into the ways you can add waits using webdriver:
Type 1 - Using driver.manager.timeouts()Implicit Waits - When you set this wait, webdriver would wait for this amount of time before failing any command.Syntax - driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);Example - Webdriver is looking to find an element using an xpath and its not able to find it, webdriver waits for 10 seconds before trying to find the element and thus failing if it still can't find the element after 10 secondsPage Load Timeouts - When you set this wait, webdriver would wait for this amount of time to declare page load timeoutsSyntax - driver.manage().timeouts().pageLoadTimeout(100, SECONDS);Example - Let's say we are navigating from one page to another, when we reach the n…
When you are trying to install API or tools from the android SDK manager and you are getting error like Downloading SDK Platform Android 2.3, API 9, revision 1 File not found: C:\Program Files (x86)\Android\android-sdk-windows\temp\android-2.3_r01-linux.zip (Access is denied)Done. Nothing installedThen you need to close the SDK manager Go to the android/sdk/tools folder Right click on the android.bat file and “Run as administrator” You need to run as an administrator to install android tools or api
Some common commands on PowerShell Change a Directory DOS: cdPowerShell: Set-LocationList Files in a Directory DOS: dirPowerShell: Get-ChildItemRename a File: DOS: renamePowerShell: Rename-ItemTo see if a DOS command has an alias, you can use the Get-Alias cmdlet. For example, Get-Alias cd shows you that cd is actually running the Set-Location cmdlet. So instead of remembering all the powershell equivalents, just remember the alias command which is Get-AliasThis way just log into PowerShell and type the command Get-Alias <command line command> and you’ll get the equivalent powerShell command of it! I’ve shamelessly copied the content from this website - http://www.howtogeek.com/163127/how-powershell-differs-from-the-windows-command-prompt/Please visit the main site for more information on PowerShell… More Power to you
You can download a simple command line tool to do this.
You can download the tool from here
Usage can be found on the website but pasting it here too for convenience:
C:\>TarTool.exe Usage : C:\>TarTool.exe sourceFile destinationDirectory C:\>TarTool.exe D:\sample.tar.gz ./ C:\>TarTool.exe sample.tgz temp C:\>TarTool.exe -x sample.tar temp TarTool 2.0 Beta supports bzip2 decompression for files with extensions like tar.bz2 and .bz2. TarTool -xj sample.tar.bz2 temp or TarTool -j sample.bz2
Download TarTool 2.0 Beta from here Unpack a .txz file on Windows
Use the 7zip tool to unpack a .txz file on windows
You can use the bzip2 and tar combined to do this…
for ex: bzip2 –cd <tar.bz_fileName> | tar –xvf -
This will unpack the contents of the tar.bz file
You can shutdown, restart a linux box from Terminal. You can use the following commands to do soOpen Terminal Type in “sudo restart” to restart the systemSometimes you may get the error “command restart not found” if you get this error then try the commands usingsudo /sbin/restart or sudo /sbin/shutdown –r nowGet more help on shutdown command using man shutdown