Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

#..

Web Element Operational Method :-


#.. perform operation on web Element..

1) click() :-- it is used to click on Web Element..

2) sendKeys() :-- it is used to enter data inside input box, text box, text area..

3) clear() :- it is used to clear the input box..

4) getText() :-- it is used to fetch the text of web element..

5) getTagName() :-- it is used to retrieve the html tag name..

6) isSelected():--it is used to check, if the web element is selected or not..


return type :-- True or False
7) isEnabled():- it is used to check, if the web element is Enabled or not..
return type :-- True or False
8) isDisplayed():--it is used to check, if the web element is Displayed or not..
return type :-- True or False

System.setProperty("webdriver.chrome.driver", "G:\\seleniume\\chrome\\
chromedriver_win32\\chromedriver.exe");

System --- Class

. --> Extention

setProperty -- > method of System class

webdriver.chrome.driver---> it is a Property of chrom brower

public class LaunchTheURL {

public static void main(String[] args) {


// Setting the property of Chrome Browser and Passing Chromedriver path

System.setProperty("webdriver.chrome.driver", "G:\\seleniume\\chrome\\
chromedriver_win32\\chromedriver.exe");
// Interface Ref Var = new Class
WebDriver driver = new ChromeDriver(); // Up Casting..
driver.manage().window().maximize();

driver.get("https://www.facebook.com/");
// driver.navigate().to("https://www.facebook.com/");

You might also like