Pages

Search This Blog

Sunday, July 6, 2014

Which is the best way to locate an element?

We choose the method based on which gives the element in fastest way in all the browsers. Finding elements by ID is usually going to be the fastest option, because at its root, it eventually calls down to document.getElementById(), which is optimized by many browsers.
Finding elements by XPath is useful for finding elements using very complex selectors, and is the most flexible selection strategy, but it has the potential to be very slow, particularly in IE. In IE 6, 7, or 8, finding by XPath can be an order of magnitude slower than doing the same in Firefox. IE provides no native XPath-over-HTML solution, so the project must use a JavaScript XPath implementation, and the JavaScript engine in legacy versions of IE really is that much slower.
If you have a need to find an element using a complex selector, I usually recommend using CSS Selectors, if possible. It's not quite as flexible as XPath, but will cover many of the same cases, without exhibiting the extreme performance penalty on IE that XPath can.

109 comments:

  1. Software testing is the process of validating a software performance and quality by employing various test cases. Software development industries are striving hard to deliver quality products to their customers. It increases the demand of experienced testing professionals. FITA is reputed software testing training institute in Chennai offering quality education in shaping software testing professionals.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete
  3. This comment has been removed by the author.

    ReplyDelete
  4. Document.getElementsByClassName() is also one of the best way to locate an element.

    Test Automation

    ReplyDelete
  5. Hi, I wish to be a regular contributor of your blog. I have read your blog. Your information is really useful for beginner. I did QTP Course in Chennai at Fita training and placement academy which offer best Selenium Course in Chennai with years of experienced professionals. This is really useful for me to make a bright career.

    ReplyDelete
  6. Really awesome blog. Thanks for sharing this informative blog. Currently I have completed Software Testing Training in Chennai at a reputed training institutes. If you are looking for best Software Testing Training Institutes in Chennai reach FITA located at Chennai, India.

    ReplyDelete
  7. This comment has been removed by a blog administrator.

    ReplyDelete
  8. That was a very informative post. Thank you so much. Keep posting more.
    Raksha
    QTP Training in Chennai | QTP Training in Chennai

    ReplyDelete
  9. Thanks for sharing this information. I read your blog and found it very useful. I used it in my training as it is easy to understand for beginners. It is important to make sure that the software application working precisely for the reason it originally designed for.
    software training institutes in Chennai | mobile testing training | software training institutes in Chennai

    ReplyDelete
  10. This comment has been removed by a blog administrator.

    ReplyDelete
  11. Selenium is a testing tool which is an open source which can work very well for the professionals and for testers. If a profesional is knowing manual testing then if he learn seenium then there are good chance for career growth.
    selenium training in chennai | selenium training institute in chennai | selenium course in chennai

    ReplyDelete
  12. Very nice blog...
    Great information provided. I appreciate your work.software testing training in noida

    ReplyDelete

  13. Thank you for the info. It sounds pretty user friendly. I guess I’ll pick one up for fun. thank u.

    Test Automation Tools Training in Chennai

    ReplyDelete
  14. looking for the best WebSphere Training in chennai? Then join at Greens Technology's WebSphere Training in Chennai

    ReplyDelete
  15. • Great! Thanks for sharing the information.
    sas training in chennai

    ReplyDelete
  16. Advanced Selenium Framework Training in Chennai by Vishwa

    Hi, Reach Mr.Vishwa for Best Selenium and Coded UI Training in Chennai with real time project assistance. This people will teach everything from the basics up to advanced level scenarios from frameworks.

    I learned from Mr.Vishwa and Raj they are very good automation people for Selenium Frameworks. After joined with them I learned many things and now I am writing automation scripts in own project. Vishwa 9003085882
    selenium training in chennai

    ReplyDelete
  17. nice blog good information and thanks for sharing...

    ReplyDelete
  18. As disussed above software testing is one of the important field in detecting the bugs. In Software testing selenium training institute in Chennai we are enabled to identify the errors with selenium course and can match the actual results with that of expected results.

    ReplyDelete
  19. Nice tips for someone new into the world of java Really great tips and finally definitely will help to develop a program in java.
    java training in chennai

    ReplyDelete
  20. Nice tips for someone new into the world of java. Really great tips and finally definitely will help to develop a program in java.
    java training in chennai

    ReplyDelete
  21. hi welcome to this blog. really you have post an informative blog. it will be really helpful to many peoples. thank you for sharing this blog.
    java training in chennai

    ReplyDelete
  22. hi welcome to this blog. really you have post an informative blog. it will be really helpful to many peoples. thank you for sharing this blog.
    java training in chennai

    ReplyDelete
  23. SELENIUM
    From My search…Creating Experts provides Best Selenium Training with real time projects assistance.Most of the modules are equipped with advance level topics which the student can learn from the basics to the advance level stage.They also provide placement assistance in leading MNC companies across the globe according to the current requirements.
    And these are the Best selenium training institute which provides Real Time Hands on Training…
    Codedion Technologies-9003085882
    Creating Experts-8122241286
    They also providing both Classroom/Online Training

    ReplyDelete




  24. This is really an awesome article. Thank you for sharing this.It is worth reading for everyone.

    Lenovo Service Center in Chennai

    ReplyDelete
  25. Besant Technologies is provide a Complete PRACTICAL Training and Complete REALTIME Training exclusively on Selenium, QTP and Jmeter. Study Material and Practice Material included during the course. We are proud to mention that we are the Best institutes to provide Software Testing COMPLETE PRACTICAL REALTIME TRAINING and hence, closely working with various companies in India. Software Testing Training Institute in Chennai |
    Selenium Training Institute in Chennai |

    ReplyDelete
  26. Looking for PLC training taught by factory trained automation engineers? Call us 91-931OO96831 for industrial automation training classes available.

    ReplyDelete
  27. thanks for this beautiful post of blog I really liked your blog, It is very goof for freshers
    Selenium training and Institute
    Selenium Training in Marathalli
    Selenium Course in Bangalore

    ReplyDelete
  28. I am very inspired to read your post, it will be very helpful for us.
    node.js development services

    ReplyDelete
  29. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here. Best Java Training Institute Chennai

    ReplyDelete
  30. Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.


    Best Java Training Institute Chennai

    ReplyDelete
  31. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    Hadoop Training Institute In chennai

    amazon-web-services-training-institute-in-chennai

    ReplyDelete
  32. Hadoop Training Institute in Noida, The Hadoop

    certification has considerable advantages in addition to the great demand for trained professionals. A certified Hadoop professional gets the

    advantage in terms of payment package compared to other professionals working in the field without certification. When it comes to IJP, Hadoop

    certification is compatible to advance the ladder and accelerate your career. big data hadoop training in Noida, big data hadoop Training institutes

    in Noida, sector 2, oracle big data training,Oracle Training

    in Noida
    , big data boot camp, nosql database training, big data appliance training, exalytics training, exadata course, big data introduction,

    oracle course, oracle training, big data training in Noida, ibm big data hadoop training institutes noida
    Hadoop Training Institute in Noida

    CONTAC CIITN:

    B-12, Sector - 2, Noida, U.P
    State - Uttar Pradesh U.P
    Country - India
    Pin Code - 201301

    Phone - +917290926565
    Mon - Sun: 10am - 6pm

    ReplyDelete
  33. CIITN provides Best java training in noida based on current industry standards that helps attendees to secure placements in their dream jobs at MNCs.The curriculum of our Java training institute in Noida is designed in a way to make sure that our students are not just able to understand the important concepts of the programming language but are also able to apply the knowledge in a practical way.

    if you are looking for the best oracle sql certification center in Noida, CIIT is worth to consider. CIIT is a oracle training institute offering best sql course, oracle training, sql certification and oracle dba training at affordable price. Best Oracle training in Noida.

    Java Training in Noida


    ReplyDelete
  34. Great post and informative blog.it was awesome to read, thanks for sharing this great content to my vision.
    embedded systems and robotics training in chennai | embedded linux training in chennai .

    ReplyDelete
  35. Live Web Experts is a remarkable academic portal that is known for offering best regulation on Accounting Homework Topic to the scholars at a meagre price.
    Live Chat @ https://www.livewebexperts.com/services

    Read More @ Assignment Help Florida
    Online Tutoring Help California

    ReplyDelete
  36. Economics assignment answers NSW – Help with Assignments is a well-known academic portal that offers high-end economics answer help to the universities and college students. Live Chat @ https://www.helpwithassignments.com/management-assignment-help

    Read More @ Help with Homework Australia
    Algebra Assignment Solver
    Nursing Homework Assignment Victoria

    ReplyDelete
  37. Wonderful piece of work. Master stroke. I have become a fan of your words. Pls keep on writing.

    Article submission sites
    Education

    ReplyDelete
  38. You blog post is just completely quality and informative. Many new facts and information which I have not heard about before. Keep sharing more blog posts.
    python interview questions and answers
    python tutorials
    python course institute in electronic city

    ReplyDelete
  39. Whoa! I’m enjoying the template/theme of this website. It’s simple, yet effective. A lot of times it’s very hard to get that “perfect balance” between superb usability and visual appeal. I must say you’ve done a very good job with this.
    aws training in bangalore
    RPA Training in bangalore
    Python Training in bangalore
    Selenium Training in bangalore
    Hadoop Training in bangalore

    ReplyDelete
  40. Thank you for sharing such great information very useful to us.
    Selenium Training institute in Noida

    ReplyDelete
  41. list of schools in faridabad

    https://veraxe.com/schools-in-faridabad

    ReplyDelete
  42. Very Helpful and informative blog! Keep sharing such blogsSoftware Development Company in India

    ReplyDelete
  43. It’s great blog to come across a every once in a while that isn’t the same out of date rehashed material. Fantastic read.best oracle training in bangalore

    ReplyDelete
  44. Really i appreciate the effort you made to share the knowledge. The topic here i found was really effective...

    eTechno Soft Solutions is a leading training institute for all kind of the Oracle Training in Bangalore with real-time experienced trainers with 100% Placement Assistance.

    ReplyDelete
  45. I am inspired with your post writing style & how continuously you describe this topic. After reading your post, thanks for taking the time to discuss this, I feel happy about it and I love learning more about this topic also visit Tableau Training videos l page and check for training

    ReplyDelete
  46. Way cool! Some very valid points! I appreciate you penning this article and also the rest of the site is really good.
    Reactjs Training in Bangalore
    UI development Training in Bangalore

    ReplyDelete
  47. Excellent Information for this blog
    We are the best piping design course in Hyderabad, India. Sanjary academy Offers Piping Design Course and Best Piping Design Training Institute in Hyderabad. Piping Design Institute in India Piping Design Engineering.
    Piping Design Course
    Piping Design Course in india
    Piping Design Course in hyderabad

    ReplyDelete


  48. The article provides good information and here i want to share some information about ibm business process manager training and Linux training videos

    ReplyDelete
  49. This comment has been removed by the author.

    ReplyDelete
  50. Well, congrats for getting launched first of all. IT is on boom these days and offering services like these is going to help you run your business perfectly. Thanks thanks for ur efforts
    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
  51. I feel really happy to have seen your web page and look forward to so many more entertaining times reading here. Thanks once more for all the details.
    Data Science Training in Hyderabad

    ReplyDelete
  52. I’m excited to uncover this page. I need to to thank you for ones time for this particularly fantastic read!! I definitely really liked every part of it and i also have you saved to look at new information in your site.
    Learn best training course:
    Business Analytics Course in Hyderabad

    ReplyDelete
  53. It is an informative blog. I would like to know more information about the new model bike. Anyway thanks a lot for sharing this post. Those guidelines additionally worked to become a good way to recognize that other people online have the identical fervour like mine to grasp great deal more around this condition.
    Data Science Training In Chennai

    Data Science Online Training In Chennai

    Data Science Training In Bangalore

    Data Science Training In Hyderabad

    Data Science Training In Coimbatore

    Data Science Training

    Data Science Online Training

    ReplyDelete
  54. www.Norton.com/Setup - visit norton.com/setup to download, install and activate Norton setup on your system.
    Norton.com/setup

    ReplyDelete


  55. The Roku Device No.1 is a streaming device that is very popular in the United States all over the world. Roku provides users with the best entertainment they have ever wanted. You can turn your computer on very quickly in easy steps.

    roku.com/link

    ReplyDelete


  56. Roku is an official link that helps user to activate their roku device or TV. In order to activate roku tv or device, user should have roku activation code.

    roku.com/link

    ReplyDelete
  57. Thanks for the Information.Interesting stuff to read.Great Article. I enjoyed reading your post, very nice share.
    Innomatics - Data Science Course Training in Hyderabad

    ReplyDelete
  58. Thanks for the Information.Interesting stuff to read.Great Article. I enjoyed reading your post, very nice share.
    Innomatics - Data Science Course Training in Hyderabad

    ReplyDelete
  59. Honestly speaking this blog is absolutely amazing in learning the subject that is building up the knowledge of every individual and enlarging to develop the skills which can be applied in to practical one. Finally, thanking the blogger to launch more further too.

    Digital Marketing training

    ReplyDelete
  60. )Deep Learning Projects assist final year students with improving your applied Deep Learning skills rapidly while allowing you to investigate an intriguing point. Furthermore, you can include Deep Learning projects for final year into your portfolio, making it simpler to get a vocation, discover cool profession openings,
    Bpm Tools Training in Bangalore

    ReplyDelete
  61. Automation Anywhere is the most demanding course in 2021. We Softlogic institute provide quality training for Automation Anywhere in Chennai. Please visit our website for more info: Best Automation Anywhere Training Institute in Chennai

    ReplyDelete
  62. This is a very technical topic and I don't understand these types of posts but I am trying to make some interest in this field. Well, today check this site Need Help With My Dissertation

    ReplyDelete
  63. This is extremely informatics, as well as clear and concise. Everything, in my opinion, has been described in a systematic manner so that the reader can get the most information and learn as much as possible. Continue the nice writing with the Dissertation Writing Services UK.

    ReplyDelete
  64. Thank you so much for sharing this post, I appreciate your work

    ReplyDelete
  65. Thank you a bunch for sharing this with all of us you actually realize what you are talking about! Bookmarked. We have a dissertation writing help uk Please also seek advice from my site =).

    ReplyDelete
  66. The best way to locate an element depends on the circumstances and on the particular element you are trying to find
    Check This How To Fight Against Unhealthy Eating Habits At University

    ReplyDelete
  67. the process used to provide the element in all browsers in the quickest possible manner. Finding items by ID is typically the quickest method because, at its core,
    Visit Life As A Part-Time University Student

    ReplyDelete