0% found this document useful (0 votes)
30 views1 page

Code 3

The document contains code to check if UI elements are enabled or disabled, it finds elements by name, ID, clicks a radio button, and validates the style attribute contains a value to assert an element is enabled.

Uploaded by

SuprinAhluwalia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views1 page

Code 3

The document contains code to check if UI elements are enabled or disabled, it finds elements by name, ID, clicks a radio button, and validates the style attribute contains a value to assert an element is enabled.

Uploaded by

SuprinAhluwalia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//

System.out.println(driver.findElement(By.name("ctl00$mainContent$view_date2")).isEn
abled());

System.out.println(driver.findElement(By.id("Div1")).getAttribute("style"));

driver.findElement(By.id("ctl00_mainContent_rbtnl_Trip_1")).click();

System.out.println(driver.findElement(By.id("Div1")).getAttribute("style"));

if(driver.findElement(By.id("Div1")).getAttribute("style").contains("1"))

System.out.println("its enabled");

Assert.assertTrue(true);

else

Assert.assertTrue(false);

Fullscreen
Go to Previous lecture59. Validating if UI Elements are disabled or enab�
Go

You might also like