Posts

PowerShell Arithmetic Operators

Image
In this tutorial we will see about PowerShell Arithmetic Operators and how PowerShell is dealing with them. Arithmetic operators are used to perform numeric calculations. As well as numeric calculations, the addition operator may also be used with strings, arrays, and hashtables. Multiplication operator may also be used with strings and arrays. Below is the list of PowerShell arithmetic operators. Operator Description Example + Adds numeric values 4 + 6 concatenates a string, arrays, and hash tables “CS” + “Tutorials” – Subtracts numeric values 4 – 2 Makes a number negative -98 * Multiple numeric values 4 * 2 copy string, arrays to the specified number of times “!” * 4 / Divides numeric values 4 / 2 % Gives remainder after division 7 % 3 For live demo, watch below video. I have demonstrated the use of PowerShell arithmetic operators by  creating calculator. Along with operators, Switch statement and While loop also used.  

Which HTML tag is used to give strikethrough effect to text?

 Two HTML tags are available to give strikethrough effect to text. 1. <s> The   <s>   tag specifies text that is no longer correct, accurate or relevant. The text will be displayed with a line through it. For example, you have seen product prices strike out during Sale period to reflect discounted price. Sale Price Rs. <s>100</s> 80 Output: Sale Price Rs. 100 80 2.  <del> <del> tag also works in same manner. Sale Price Rs. <del>100</del> 80 Output: Sale Price Rs. 100 80

HTML | frameset Tag

Image
In this tutorial, you will learn how to divide browser window into multiple sections with each section having its own content. HTML <frameset> Tag The <frameset> tag in HTML is used to define the frameset. The <frameset> element contains one or more frame elements. Syntax: <frameset cols = "pixels|%|*"> Attributes: cols : The cols attribute is used to create vertical frames in web browser. This attribute is basically used to define the no of columns and its size inside the frameset tag. rows : The rows attribute is used to create horizontal frames in web browser. This attribute is used to define no of rows and its size inside the frameset tag. Value of cols and rows can be provided in pixels, % or *. Creating Vertical Frames To create a set of vertical frames, we need to use the frameset element with the cols attribute. The cols attribute is used to define the number and size of columns. We have three files to display in different sections vertically. ...

Copy, Move and Delete files with PowerShell

Image
In this article, let me show you how you can use PowerShell to copy, move and delete files. Before we go through these commands, let me show you how to navigate between different directories/folders. How to change the directory (folder) in Command Prompt (CMD) CD (Change Directory): This command enables you to change the current directory.  When you need to go one folder up, use the "cd.." command. Let’s assume that you want to go back to the Windows folder. Type “cd..” and press Enter on your keyboard. cd takes you to the top of the directory tree when you pass " \ " after it. In this case, to the “C:” drive. If you need to go to a specific folder from this drive run the command "CD Folder". for example, When you need to access the cstutorials folder located in "C:" type "cd cstutorials" as shown below, and then press Enter on your keyboard. CD cmdlet is alias for set-location. you can use set-location also. How to create a new directo...

What is the way forward after Coded UI deprecation

What we will do after Coded UI deprecation? Most of us are aware about Microsoft official announcement that Coded UI will no longer be available after Visual Studio 2019. This news triggers the question for those teams who are using Coded UI, what they will do? We have listed down here some points that might help to take a decision. Why Microsoft is deprecating Coded UI Test? Coded UI tests are used for UI-driven functional automation of web apps and desktop apps. Open source UI testing tools such as  Selenium  and  Appium  have gained momentum in recent years, have a strong community backing and are now pretty much industry standards. Coded UI’s cross-browser testing solution was itself based on Selenium. Additionally, both Selenium and Appium work cross-platform and support multiple programming languages. Other important point is that Test automation focus is also shifting from predominantly UI driven testing to more unit testing and API testing. For how ...

Controlling Your Code's Flow with PowerShell's Control Statements

Image
PowerShell Control Statements Windows PowerShell provides several ways to control the flow of code. You can use conditional statements to define conditions and the actions to occur when those conditions are met. You can even specify the actions to occur when a condition isn’t met. PowerShell Control statements can be broken down into three sections: Conditional statements Used when you want to execute line of code depending upon some condition. Looping statements Used when you want to perform some task multiple time. Flow control statements Used along with conditional and loop statements to control the flow of execution. Lets go through all, one by one: Conditional statements if statement - execute the script if condition evaluates to true. elseif statement - execute the script if condition evaluates to true and all if, elseif conditions before it false. else statement - execute the scripts that follows it when none of the conditions in if, elseif evaluates to true. Syntax ...