Tuesday, March 25, 2014

Remove attribute from html using javascript, webdriver, python

EXAMPLE:
<tag id="id" name="name" class="class" readonly="readonly">EXAMPLE</tag>

self.find_elem_by_id("id").get_attribute("innerHTML") => EXAMPLE
self.find_elem_by_id("id").get_attribute("outerHTML") => <tag id="id" name="name" class="class" readonly="readonly">EXAMPLE</tag>

self.driver.execute_script('document.getElementById("id").removeAttribute("readonly")') => <tag id="id" name="name" class="class">EXAMPLE</tag>

18 comments:

  1. >>self.driver.execute_script('document.getElementById("id").removeAttribute("readonly")')

    Holy cow, this code does work!! It solves my problem, thanks a lot!!

    ReplyDelete

  2. Amazing, thanks a lot my friend, I was also siting like a your banner image when I was thrown into Selenium.When I started learning then I understood it has got really cool stuff.
    I can vouch webdriver has proved the best feature in Selenium framework.
    Thanks a lot for taking a time to share a wonderful article.

    Best Selenium Training Institute in Chennai |
    Selenium Training in Velachery

    ReplyDelete
  3. Thanks a lot very much for the high quality and results-oriented help. I won’t think twice to endorse your blog post to anybody who wants and needs support about this area.
    digital marketing training in tambaram

    digital marketing training in annanagar

    digital marketing training in marathahalli

    digital marketing training in rajajinagar

    Digital Marketing online training

    full stack developer training in pune

    ReplyDelete
  4. I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 

    Data Science training in marathahalli
    Data Science training in btm
    Data Science training in rajaji nagar
    Data Science training in chennai
    Data Science training in kalyan nagar
    Data Science training in electronic city
    Data Science training in USA
    Data science training in pune

    ReplyDelete
  5. Great Article… I love to read your articles because your writing style is too good, its is very very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.
    java training in chennai | java training in bangalore

    java online training | java training in pune

    java training in chennai | java training in bangalore

    ReplyDelete
  6. The site was so nice, I found out about a lot of great things. I like the way you make your blog posts. Keep up the good work and may you gain success in the long run.
    python training in pune
    python online training
    python training in OMR

    ReplyDelete
  7. Thank you for taking the time and sharing this information with us. It was indeed very helpful and insightful while being straight forward and to the point.
    Blueprism training in tambaram

    Blueprism training in annanagar

    Blueprism training in velachery

    ReplyDelete
  8. I am really happy with your blog because your article is very unique and powerful for new reader.
    Click here:
    selenium training in chennai
    selenium training in bangalore
    selenium training in Pune
    selenium training in pune
    Selenium Online Training

    https://missdynamicscrm.blogspot.com/2015/06/quick-tip-generic-sql-error-crm-plugin-csharp.html

    ReplyDelete
  9. It's very excellent concept! Really too good and i got very useful information from your blog.
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  10. This is such a good post. One of the best posts that I\'ve read in my whole life. I am so happy that you chose this day to give me this. Please, continue to give me such valuable posts. C
    devops online training

    aws online training

    data science with python online training

    data science online training

    rpa online training

    heers!

    ReplyDelete
  11. such a great word which you use in your article and article is amazing knowledge. thank you for sharing it.

    Become an Expert In SAP BASIS Training! The most trusted and trending Programming Language. Learn from experienced Trainers and get the knowledge to crack a coding interview, @Softgen Infotech Located in BTM Layout.

    ReplyDelete
  12. Thank you for benefiting from time to focus on this kind of, I feel firm about it and also really like comprehending far more with this particular subject matter.i like tooo.
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

    ReplyDelete