Tuesday, March 25, 2014

Remove attribute from html using javascript, webdriver, python

<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>


  1. we provides you a best equity, Share Market Advisory tips in stock market. which gives opportunity for performing trading in share market and makes profit in short-term basis or invest money in long-term. In Trading you are make money and improve your lifestyle.
    stock tips

  2. Nifty Calls along with Bank Nifty Tips You would be getting complete strategy along with Targets & SL. We Provide Best Intraday Sureshot Commodity Trading Tips.
    Share Market Tips

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

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


  4. 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

  5. Thanks for the informative article. This is one of the best resources I have found in quite some time. Nicely written and great info. I really cannot thank you enough for sharing.

    rpa Training in Chennai

    rpa Training in bangalore

    rpa Training in pune

    blueprism Training in Chennai

    blueprism Training in bangalore

    blueprism Training in pune

    rpa online training

  6. 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

  7. 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

  8. 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

  9. This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me.. 
    Devops Training in Chennai

    Devops Training in Bangalore

    Devops Training in pune

  10. 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