HTML Option Selected Attribute

Arjun Thakur
Updated on 11-Jun-2020 11:10:05

222 Views

The selected attribute in the element pre-selects an option when the page loads. The same option would be visible.Following is the syntax −Let us now see an example to implement the selected attribute of the element −Example Live Demo Educational Qualification Postgraduation    MCA    M.COM    M.TECH    M.Sc OutputIn the above example, we have a to set a drop-down list: MCA M.COM M.TECH M.Sc In that, different options are set with element −MCA M.COM M.TECH M.ScWe have set the default visible option when the page loads using the selected attribute ... Read More

HTML ol reversed Attribute

Ankith Reddy
Updated on 11-Jun-2020 11:08:46

4K+ Views

The reversed attribute of the element in HTML is used to set reversed ordering of list items in an ordered list. It displays the numbering in descending order and introduced in HTML5.Following is the syntax −Let us now see an example to implement the reversed attribute of the element −Example Live Demo Rank in Descending order    Tom    Jack    Will    Harry    Tim    Steve    David    Kane    William    John OutputIn the above example, we have set an unordered list with the following list items under −Tom ... Read More

HTML S Tag - Strikethrough Text

George John
Updated on 11-Jun-2020 11:06:00

162 Views

The tag in HTML is used to mark a text that is no longer relevant. This tag was redefined in HTML5 to display a text that is not accurate.Let’s see an example to implement the element −Example Live Demo Exam Results    Result would be announced on 6th June.    New date for results are 7th June. OutputIn the above example, we have set a text which is no longer relevant− Result would be announced on 6th June. The usage of would strike the same text as shown in the above output.

HTML q Cite Attribute

Arjun Thakur
Updated on 11-Jun-2020 10:48:31

182 Views

The cite attribute of the element is used to set the source URL of a quote. The source won’t get displayed on the web page, but it is beneficial for the screen readers.Let us now see an example to implement the cite attribute of the element −Example Live Demo What we want? PETA states,    We are the largest animal rights organization in the     world, with more than 6.5 million members and supporters worldwide. We need your continued     support in order to stop cruelty to animals wherever it occurs. OutputIn the above example, ... Read More

PHP acosh Function

Malhar Lathkar
Updated on 11-Jun-2020 09:51:30

271 Views

Definition and UsageThe acosh() function returns the inverse hyperbolic cosine ratio of given angle in of given parameter. In other words, the return value of asinh() is hyperbolic sine of given parameter. A hyperbolic inverse hyperbolic cosine function is defined as −.acosh(x) = log(x+sqrt(pow(x, 2)-1))This function returns a float value.Syntaxacosh ( float $arg ) : floatParametersSr.NoParameter & Description1argA floating point value whose inverse hyperbolic cosine is to be calculatedReturn ValuesPHP acosh() function returns inverse hyperbolic cosine ratio of given parameter.PHP VersionThis function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.ExampleFollowing example calculates acosh(pi/2) and returns ... Read More

PHP acos() Function

Malhar Lathkar
Updated on 11-Jun-2020 08:36:23

302 Views

Definition and UsageThe acos() function Returns the arc cosine or cos inverse of arg in radians. acos() is the inverse function of cos(). Therefore if cos(x)=y, acos(y)=x.For example, cos(pi/2)=0 and acos(0)=1.57079633 rad which is equal to pi/2.This function returns a float value.Syntaxacos ( float $arg ) : floatParametersSr.NoParameter & Description1argA floating point number whose arc cosine is to be calculated. Number should be withing -1 to 1Return ValuesPHP acos() function returns arc cosine of given number. It is angle represented in radians.PHP VersionThis function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.Example Live DemoFollowing example calculates ... Read More

PHP abs() Function

Malhar Lathkar
Updated on 11-Jun-2020 08:30:57

3K+ Views

Definition and UsageThe abs() function is an in-built function in PHP iterpreter. This function accepts any number as argument and returns a positive value, disregarding its sign. Absolute value of any number is always positive.This function always returns positive number.Syntaxabs( mixed $num)ParametersSr.NoParameter & Description1numThis parameter stores a value whose absolute value is to be obtained.Return ValuesPHP abs() function returns absolute value of num. If data type of num is float, return type is also float.For integer parameter, return type is integer.PHP VersionThis function is available in PHP versions 4.x, PHP 5.x as well as PHP 7.x.Example Live DemoFollowing example shows that ... Read More

Perform Right Click on an Element with Actions in Selenium

Debomita Bhattacharjee
Updated on 10-Jun-2020 15:05:47

3K+ Views

We can perform right click on an element in Selenium with the help of Actions. In order to perform the right click action we will use contextClick () method. First we need to move to the specific element with the help of moveToElement() method then will do the right click with contextClick() method. Finally use build().perform() to execute all the steps.Exampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.Actions; import java.util.concurrent.TimeUnit; public class RightClick{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       WebDriver driver = new ChromeDriver();   ... Read More

Perform Mouseover Action on an Element in Selenium

Debomita Bhattacharjee
Updated on 10-Jun-2020 15:04:22

4K+ Views

We can perform mouseover action on elements in Selenium with the help of Actions class. In order to perform the mouse movement we will use moveToElement () method of the Actions class. Finally use build().perform() to execute all the steps.Exampleimport org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.interactions.Action; import org.openqa.selenium.interactions.Actions; import java.util.concurrent.TimeUnit; public class MouseOver{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver", "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       WebDriver driver = new ChromeDriver();       String url = "https://www.tutorialspoint.com/questions/index.php";       driver.get(url);       driver.manage().timeouts().implicitlyWait(12, TimeUnit.SECONDS);       // actions class ... Read More

Count the Number of Frames in a Page Using Selenium

Debomita Bhattacharjee
Updated on 10-Jun-2020 15:02:33

4K+ Views

We can count the number of frames in Selenium by the methods listed below −With the help of List with tagname frame/iframe.With the help of a Javascript executor.ExampleWith tagname.import org.openqa.selenium.By; import org.openqa.selenium.Keys; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; import java.util.concurrent.TimeUnit; import java.util.List; public class FrameCount{    public static void main(String[] args) {       System.setProperty("webdriver.chrome.driver",       "C:\Users\ghs6kor\Desktop\Java\chromedriver.exe");       WebDriver driver = new ChromeDriver();       String url =       "http://the-internet.herokuapp.com/nested_frames";       driver.get(url);       driver.manage().timeouts().implicitlyWait(12, TimeUnit.SECONDS);       //By finding list of the web elements using frame or ... Read More

Advertisements