18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

How to use "style" in Java??

AkshadaAkshada Members
edited November -1 in Sahi - Open Source
Hi,

I want to get a color of a "div". How do i use style here in JAVA??
Also can i know if a text is underlined. Like it is enclosed under <u></u> tag??

Thanks in advance!!
Regards
Akshada

Comments

  • Hi Akshada,

    To get a color of a div use:

    browser.div("divId").style("color");

    To know the text is underlined,the syntax is:

    assertEquals("underline", browser.element("elementID").style("text-decoration"));

    Regards
    Sumitra
  • Hi

    Is it also possible to change the color?

    Regards
Sign In or Register to comment.