ابدأ بالتواصل مع الأشخاص وتبادل معارفك المهنية

أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.

متابعة

Is PhantomJS / CasperJS better than Selenium when it comes to automation web-testing?

PhantonJs provides headless browser and is extremely quick. Secondly, with CasperJs, writing test cases are quick and easy. Would like to know what are your thoughts?

user-image
تم إضافة السؤال من قبل Milan Chheda , Project Manager - Scrum Master , Dubai Customs via GTFS
تاريخ النشر: 2016/08/30
saad nazmi
من قبل saad nazmi , Senior Software Testing Engineer (Remote) , National Water Company (KSA)

NO Selenium Is better Than other tools

Sana Malik
من قبل Sana Malik , Sr. SQA Engineer , NETSOL Technologies lnc.

Meight be but Selenium is a good tool for web automation. There is not third party involve in this tool.

SAMIT BHUNIA
من قبل SAMIT BHUNIA , SQL Developer

Below are my views:

1. Easier development with Inspect Element

While writing automation against other pages, I didn’t always know what HTML element I needed to write code for. So I would write code by using a UI, right clicking on some part of the page, then selecting the HTML element I wanted.

2. When you need a specific JavaScript engine

PhantomJS uses QtWebKit. That means PhantomJS is not the same JavaScript engine that Chrome uses.For the most part it won’t matter. However, if you need to be% sure it looks and acts like a browser then you need a real browser.

3. When the website uses strange browser detection

An exmaple use case is scraping websites. I’ve found websites that give you slightly different HTML than they present a browser even after you change the user-agent string. My guess is they also might attempt to detect HTML5 features or a Flash plugin.

From an SEO perspective the change in HTML it’s nothing that I would consider a negative or a cloak but the interesting bits I wanted weren’t there to scrape or interact with. A real browser was the only thing that worked for me.

4. I actually need Flash

It works partly by using an invisible Flash movie. So by default, I will need a real browser to make this test work.

5. When you need a browser specific features

Some features I work on include steps that uploads files, print from the webpage, opens separate windows, switches tabs, and uses browser plugins.

Some features I work on right now include these steps. While we have those features covered in unit tests, I’m also testing them manually for important features. I anticipate this is a good way to automate those tests.

المزيد من الأسئلة المماثلة