How to get color of an SVG element | How to handle SVG in Selenium

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 16

  • @VeluR-1993
    @VeluR-1993 3 หลายเดือนก่อน +1

    Bro first of all i want to thank you so much. I got my first remuneration today. I'm helping one my friend who does freelancing. I'm so happy and I have hope that i can get job too. Whenever i get any doubts i come here. Grateful for you. I felt so happy today. He appreciated my work also. All credits goes to you brother.

    • @letcode
      @letcode  3 หลายเดือนก่อน +1

      Glad to hear bro, congratulations.

    • @VeluR-1993
      @VeluR-1993 3 หลายเดือนก่อน +1

      @@letcode Thanks Bro

  • @palanivelpalaniyappan
    @palanivelpalaniyappan 2 ปีที่แล้ว +1

    Good one bro. When come to automate the graph, shall we have to use the same concept?

    • @letcode
      @letcode  2 ปีที่แล้ว +1

      Yes bro 😊

  • @sivamurugan3346
    @sivamurugan3346 2 ปีที่แล้ว +1

    super bro

    • @letcode
      @letcode  2 ปีที่แล้ว

      Thanks bro 😊

  • @pfunky
    @pfunky ปีที่แล้ว +1

    Why is it that we check the color before hovering on the svg element itself but after hovering on the path?
    I ask this because from what I can see, the color on the svg element remains the same before and after and same thing for the path so this doesn't really communicate any change IMO.

    • @letcode
      @letcode  ปีที่แล้ว

      There is a change in the colour from white to green.

    • @pfunky
      @pfunky ปีที่แล้ว

      @@letcode when you hover, yes. But if you want to verify on the element, it makes more sense to verify on the same element rather than on different elements because the two elements you used will give the same output both before and after.

    • @letcode
      @letcode  ปีที่แล้ว

      I hope you noticed the before and after sysout.
      Svg is the parent element, and within that we g and path element.
      Based on the hover state the g and path will change.
      As the fill is within the path i have to get that.

    • @pfunky
      @pfunky ปีที่แล้ว +1

      @@letcode yes and that makes sense except that on the before you were checking the fill on the svg element and not on the path.

    • @pfunky
      @pfunky ปีที่แล้ว

      @@letcode And the fill on the path on the before hover is still exactly the same 🤷🏾‍♂️

  • @saravanakumarsenthurpandi1376
    @saravanakumarsenthurpandi1376 2 ปีที่แล้ว +1

    how to get color name through automation itself bro

    • @letcode
      @letcode  2 ปีที่แล้ว +1

      We cannot get the colour name bro, only hex value it will return.