Forum Discussion

TanIlak's avatar
TanIlak
Contributor
3 years ago
Solved

verify color of text and textbox

Hi all,

Here when the page loaded am trying to verify the search field that displays grey color and text as "search Amazon.in"

After entering text or click it changed as orange

How to verify the color changes???

Here the attachment

 

 

  • Hi!

     

    The roadmap portal can be found here: Welcome - Zephyr Scale | Product Roadmap (productboard.com)

     

    I've listed some thoughts on both approaches.  Given the choice I would go with multiple test cycles as for me it offers the best reporting options and the least risk of 'user error'.

     

    Multiple test cycles:

    • It's quick and easy to clone test cycles
    • Having multiple test cycles makes reporting and dashboarding clean and easy
    • You can use the Test Cycle homepage to view both cycles next to each other for an overview of testing progress
    • If you change the test cycles' underlying test cases, you may need to update multiple test cases in multiple test cycles (there is a request to have an 'update all' feature on the roadmap you can vote for 🙂)

     

    Multiple executions:

     

    • It's quick and easy to start a new execution and change the environment
    • Reporting and dashboarding is a little more involved (filter by environment)
    • Testers may forget to change the environment and skew your reporting
    • There's no immediate overview reporting against both environments in the Test Cycle homepage to understand progress (whereas with multiple test cycles that image is clear).

     

    Hope that helps.

7 Replies

    • TanIlak's avatar
      TanIlak
      Contributor

      Thank you rraghvani

      Inline style not worked, As you said computed style is working.

  • It is possible to write a function and print the actual values of,

     

    rgb(255, 0, 0) = Red

    rgb(0, 255, 0) = Green

    rgb(0, 0, 255) = Blue

     

    If you search the internet, you will come across examples.

    • TanIlak's avatar
      TanIlak
      Contributor

      var fontColor=page.FindElement();

      Log.Message(fontColor.style.color);

       

      >> Empty log file only printing

       

  • You have not provided any parameters for FindElement, so how will TC know what object you are referring to?

     

    I suggest you use your browsers' development tool to see exactly what styling are being used. You should then be able to use this in TC.

    • TanIlak's avatar
      TanIlak
      Contributor

      I forgot to add parameter in my last reply

       

      var fontColor=page.FindElement(xpath);

      Log.Message(fontColor.style.color);

       

      xpath contains===< div class=" *attributevalue * " >