Q1-What is Automation Testing
Answer- When you talk about Software testing or Quality assurance of any product it means we have to deliver our application bug free it means no defect in our application. In order to achieve quality we perform testing in our application it means we perform several test case it can be functional test cases and nonfunctional test cases also.
In order to save our time and resource we can automate manual test cases, which save human effort and time as well.
Scenario – If we need to test same scenario 100 times manually and each time we are checking the same result then better to automate this test case and run it number of times and verify the result.
We have different tools available in the market, which gives us the liberty to automate our application
Q2- When Automation testing should be performed?
Answer- We can perform automation testing in our day to day testing activities it means when we have to execute some test case on regular basics then better to automate that test cases
Majorly we perform automation testing for regression testing, smoke testing and sanity testing as well.
Scenario- If you have 50 scenario that you have to execute on daily basis and you will be testing the same scenario for next couple of releases as well then manually running these test cases will be tedious task so here you can adopt automation testing.
Q3-Which test case cannot be automated?
Answer-
1-This is very important and interesting question as well that which test cases cannot be automated, my answer is you should avoid test cases which is changes very frequently it means even if you will automate that test case next time it will fail because application feature will change so better to choose test case which is stable.
2- We should not automate test cases which has manual interaction like enter authorization code, capcha code etc.
Selenium introduction
Answer- Selenium is Open source Web Automation tool which was designed by ThoughtWorks in 2004, It started by Selenium IDE then Selenium RC which is also known as Selenium 1 then Selenium Webdriver which is also known as Selenium 2
Selenium is very popular now days because of many reasons
- It is open source tool, which means we do not have to purchase any license for this. We can download from their officially website and we can use.
- It support many languages like Java, Java Script, C#, Python, Ruby etc.
- We can perform cross browser testing as well. Selenium Webdriver support almost all browser which their latest version like Firefox, Chrome, IE, Safari, Opera etc.
- It support the entire platform like Windows, UNIX, Linux, Apple etc.
- Recently Selenium has introduced mobile testing as well, now we can automate Android testing using Selendroid, IPhone testing using appium and many more.
- Selenium having compatibility with many tools well some example are AutoIT, Jenkins, Sikuli, Testng, Junit etc.
rajeswari says
Hi Mukesh,
how to get diasabled dropdown value using selenium
Mukesh Otwani says
Hi Rajeswari,
It depends on which kind of control web developer has used. If you are able to see select tag then you should be able to see all values with option tag or if it is select2 or any other type of control which contains ul, li, div tags then it is difficult to get those options.
Rajendra says
Hi mukesh, I am using data driven framework locators and data are reading from excelsheet. If I want to click share link it gives four icons like facebook, linked in, Google plus and Twitter I want to share image with all four social media how to write code. If I click facebook it I’ll open new tab then I want perform operation and share data it comes back share page.same for linked in and twitter and googleplus
Mukesh Otwani says
Hi Rajendra,
If you are dealing with Selenium which only works with Web UI then you what you can do manually same can be achieved through Selenium also because it fully depends on UI. But if you don’t want to use Selenium Ui then you have to deal with API of corresponding application.
Vinotj says
Hi I need check the 50 url at a time and share the active and inactive url to the mail can you help to how to proceed
Mukesh Otwani says
Hi Vinotj,
Please refer these links…
1. http://learn-automation.com/find-broken-links-using-selenium/
2. https://www.youtube.com/watch?v=qGq9K85mGyA (here check for proxy/firewall settings)
Ritesh says
Hi Mukesh,
Need your help.
I want to do click operation on image link and here is the HTML Code. Want to do using Selenium Webdriver in python. Please suggest:-
Mukesh Otwani says
Hi Rithesh,
You might be able to see img tag, try to click on it.
sagar says
Hi,
First a big thanks to you for such amazing conceptual videos.
I have one problem,
I am working on dataDriven F/w and accessing test inputs from exelSheet , after each entry it will quit my browser but i am not able o continue my browser after test passed.
how can i continue with same page after test passed
Mukesh Otwani says
Hi Sagar,
Please debug your code to check error/exception.
deepak says
Hi Mukesh,
I am getting error while opening the chrome.
Invalid port. Exiting…
?????? ??, ???? ?:??:?? ????????? org.openqa.selenium.os.OsProcess checkForError
SEVERE: org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
Exception in thread “main” org.openqa.selenium.WebDriverException: Timed out waiting for driver server to start.
Build info: version: ‘3.9.1’, revision: ’63f7b50′, time: ‘2018-02-07T22:42:22.379Z’
System info: host: ‘HP’, ip: ‘192.168.1.9’, os.name: ‘Windows 10’, os.arch: ‘amd64’, os.version: ‘10.0’, java.version: ‘1.8.0_121’
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:192)
Mukesh Otwani says
Hi Deepak,
Which chromedriver version are you using?
sreehari says
this is error how to solve this
Exception in thread “main” java.lang.IllegalStateException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
at com.google.common.base.Preconditions.checkState(Preconditions.java:754)
at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:124)
at org.openqa.selenium.firefox.GeckoDriverService.access$100(GeckoDriverService.java:41)
at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:141)
at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:339)
at org.openqa.selenium.firefox.FirefoxDriver.toExecutor(FirefoxDriver.java:158)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:120)
at org.openqa.selenium.firefox.FirefoxDriver.(FirefoxDriver.java:98)
at sr.ha.main(ha.java:9)
error
this wer driver fire
Mukesh Otwani says
Hi Sreehari,
Please check this link http://learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/
swaraj says
Hello,
If i have 2 autosuggestion boxes of same name, after using that for ‘from’ field, not able to use the same and select from auto suggestion for ‘To’ Filed. site is redbus.com. Can you please help me?
Mukesh Otwani says
Hi swaraj,
Kindly use dynamic xpath to locate From and To fields. Please check this link for more info http://learn-automation.com/how-to-write-dynamic-xpath-in-selenium/
Shantanu Devkar says
Hi..Mukesh Othwani Sir,
Selenium support to all latest browser, this is advantage of selenium. But i have tried, it is not supported. I have used 2.53 version of selenium jar in my project and ran on 56.0 latest firefox Browser. But it is not supported….so, what should I do…How to resolve this issue.
Mukesh Otwani says
Hi shantanu,
Use FF 46.0 with Selenium 2.53.1. In order to work with latest FF, you need to migrate to Selenium 3.6.0 version which uses gecko driver. Latest chrome with latest chromedriver works anyway.
Kumar says
I have one scenarios
there is submit button on registration page . you on that button. while you navigate to the next page take a longer time to load, as site is heavily loaded with request . you need to handle this loading and validate the text in screen “You have successfully registered”.
Mukesh Otwani says
Hi Kumar,
Use Fluent wait. You need to set maximum time limit an keep on waiting for required message using this fluent wait. For more details check this link http://learn-automation.com/fluentwait-in-selenium-webdriver/
Mandar says
How we can find our case is failed due to your’s 5 things like network failure…….in testng or selenium. Also hot to handle these type of cases
Mukesh Otwani says
Hi Mandar,
Please check these links…
1.) http://learn-automation.com/execute-failed-test-cases-using-selenium/
2.) http://learn-automation.com/re-run-selenium-failed-test-cases/
hema says
hi,
I Have One scenario To Capture image from webcam.
manually i didnt get any browser popup but while running script when i clicked on webcam button browser popup coming for “share Selectedlocation” .how to handle this .please help me.
Mukesh Otwani says
Hi Hema,
If it is web based pop up then directly use Selenium otherwise try with AutoIT or robot class to avoid pop up.
Parthasarathi Tripathy says
Really your videos and explanation is helpful for learning Selenium. Thanks for your effort and presentation which helps me a lot to learn Selenium Automation as i am new to this.
Mukesh Otwani says
Hi Parthasarthi,
Thanks for your review. keep visiting my blog and also keep learning.
Be in touch…
hema says
Hi ,
Can u give clear explnation about wait commands .
And in which case we need to use those commands.
Mukesh Otwani says
Hi Hema,
Please refer these links..
1. http://learn-automation.com/implicit-wait-in-selenium-webdriver/
2. http://learn-automation.com/explicit-wait-in-selenium-webdriver/
3. http://learn-automation.com/fluentwait-in-selenium-webdriver/
RANJAN V says
Nice.
Mukesh Otwani says
Hey Ranjan,
Thanks for your comments..:)
shailendra says
Hi Mukesh Otwani,
How we execute the java program in Jenkins on mac ?
Please tell me the step by step configuration step
Mukesh Otwani says
Hi Shailendra,
Please check this link http://learn-automation.com/selenium-integration-with-jenkins/
Gangadhar Wali says
Hi Mukesh,
Thanks for your wonderful work.
My web application is in remote desktop, please assist me how to connect to remote desktop using selenium,
Regards
Wali
Mukesh Otwani says
Hi Wali,
If your jenkins server is possible to get connect to that remote then make it as Slave/Node and execute through Jenkins or else go for Selenium Grid.
udit says
sir i don’t know about selenium plz suggest me step by step video from the basic selenium topic wise.
Mukesh Otwani says
Hi Udit,
Please start from this link
udit says
thank you sir, I have a more question which eclipse is best for selenium testing
Mukesh Otwani says
Hi Udit,
You can use eclipse latest version based on your system architecture (32Bit or 64Bit)
Ashwary says
Hi Mukesh,
Please help me …exactly at this point i m stucking from long tym…..plz help ….why this “Element not found” exception always comes.
My Mail-id:-tehiboy6@gmail.com
org.openqa.selenium.NoSuchElementException: Unable to locate element: {“method”:”xpath”,”selector”:”html/body/div[1]/aside/section/ul/li[4]/a”}
Command duration or timeout: 85 milliseconds
Mukesh Otwani says
Hi Ashwary,
Please use fluent wait to handle this situation, more info on this link http://learn-automation.com/fluentwait-in-selenium-webdriver/
Mukesh Otwani says
Hi Ashwary,
Use Fluent wait to handle this.
sonali pradhan says
Hi Mukesh I am not getting the code for broken links in your website that is learn-automation.com. where I can find that. Can you suggest me how to detect unreachable pages in selenium webdriver
Mukesh Otwani says
Hi Sonali,
Please check this http://learn-automation.com/find-broken-links-using-selenium/
kalpesh Patil says
Hi Mukesh,
How can I use single login script, if I pass ID of webElement or Xpath of webElement ??
Mukesh Otwani says
Hi Kalpesh,
Create a separate class for login. Provide parameters from testng xml file or pass these parameters from your main test method.
There are lot of other ways too.
Leo Lowranse says
Hi Mukesh,
Your videos and posts are really helping me a lot to pace up with Selenium Automation.
Keep up the good work dude. 🙂
Regards,
Leo Lowranse
Mukesh Otwani says
Hi Leo,
Thanks for your pleasing feedback. Please be in touch with learn-automation…:)
Priya says
Hi Mukesh,
How to handle dynamic web table in selenium webdriver?
Mukesh Otwani says
Hi Priya,
Please refer this link http://learn-automation.com/handle-calender-in-selenium-webdriver/
Ash says
Hi sir,
please guide me,how to start with frame work.I am working for social networking site,just like facebook.Its a big project.
Mukesh Otwani says
Hi Ash,
If possible the proceed with Page Object Model using PageFatory mechanism. Please visit this link http://learn-automation.com/page-object-model-using-selenium-webdriver/
Imraz Ansari says
Sir I want know how to enter the password in gmail through xpath
Mukesh Otwani says
Hi Imraz,
Xpath -> //*[@type=’password’] & sendKeys()…simply works here. The xpath which i mentioned is one way but there are lot of other ways too.
Sneha says
Hi mukesh will u please send me any link like registration page using TestNG. i am selenium beginner . I learn lot much things from your videos thanks mukesh . you are best.
Mukesh Otwani says
Hi Sneha,
You can use link for your practice stuff https://orangehrm-demo-6x.orangehrmlive.com/
Vinoth says
Hi Mukesh,
I need to clarify one doubt, how can upload the image using robot for mac users but there is no text box??
Mukesh Otwani says
Hi Vinoth,
Please check this link http://learn-automation.com/upload-file-in-selenium-in-mac/
Prashant says
Hi Mukesh
I have one question
How to count how many number of rows and columns in our web page in selenium webDriver?
Mukesh Otwani says
Hi Prashant,
Check this with dynamic xpath. Check //table then look for tr and td tags.
Dipesh Raul says
Hi Mukesh,
Happy to say that Your videos are very Helpful to learn automation testing using selenium.
Could you please post the videos on contineous integration(CI) and contineous Deployment(CD) using jenkins or any using any other tools?
Mukesh Otwani says
Hi Dipesh,
Please check this link http://learn-automation.com/selenium-integration-with-jenkins/
Priya says
Hi Mukesh,
How to handle an error that may happens anytime in any of the page ..
Mukesh Otwani says
Hi Priya,
Errors are not recoverable but Exceptions can be handled. And in order to handle exceptions, you must must aware of kind of exception which may occur.
shardha sharma says
Hi Mukeash,
M facing an issue while running the script.
Exception in thread “main” org.openqa.selenium.WebDriverException: unknown error: cannot get automation extension
from unknown error: page could not be found: chrome-extension://aapnijgdinlhnhlmodcfapnahmbfebeb/_generated_background_page.html
(Session info: chrome=57.0.2987.133)
Mukesh Otwani says
Hi Shardha,
It looks like you have run your automation script in chrome browser. Please update your chromedriver to atleast 2.28 version.
shardha sharma says
Thank you….Mukesh….
I updated & its working now….
And your videos & blog is very helpful to us to learn selenium….
Can u plz tell me … how to prepare for the selenium interviews & can share the interview question too..
Thanks
Mukesh Otwani says
Hi Shardha,
Happy to read from you. There is no specific way to prepare for automation interviews as each interviewer would be having their own perspective. More and more you explore, more you will learn. I’ve posted few questions from my side, link for same is here http://learn-automation.com/selenium-interview-questions-and-answers/
Syed Hashmi says
Hi Mukesh,
Your videos and posts about automation are very fruitful appreciate your work
Mukesh Otwani says
Hi Syed,
Very thanks for your overwhelming comments. Keep commenting your doubts, I’ll try my level best to clarify.
piyush says
Hi Mukesh,
I would like to Know, as an automation engineer should we decide , that this application is best for automation testing not manual testing? Say, when the client really doesn’t have much clear idea about requirements and if there is a sprint release after every 2 weeks?
Mukesh Otwani says
Hi Piyush,
It is quite tough to explain these kind of circumstances. Automating any application not only depends of coding knowledge, it also requires functional knowledge of an application. Again it includes the way UI has been designed. Usually automation of an application is carried out for regression testing not for application which is still under development. Here functionality also matters a lot because if functionality is too big then scripting also takes lot of time. Finally the selection of framework and reporting. In my opinion, you should consult any senior member of your organization who should have know how of development.
Ajay says
Hi mukesh..!
Your site is providing good knowledge for freshers and also kindly update the tutorial about Testng,maven,Pom,Modular driven Frameworks pleaw
Mukesh Otwani says
Hi Ajay,
Thanks for your constructive comment…:)
lavanya says
Hi
UI testing is possible in automation
Mukesh Otwani says
Hi Lavanya,
Yes, this is what Selenium does
Aishwarya Chaudhary says
Hii Mukesh
Thank you so much for your solution.
Mukesh Otwani says
Thanks Aishwarya…:)
Mohinni says
Hats off to your hard work Sir.You have explained each and every topic in detail.It’s helping me learning selenium.
Mukesh Otwani says
Thanks Mohini…:)
Pranshu says
Hey Mukesh,
Amazing stuff, thanku
Mukesh Otwani says
Hi Pranshu,
Thanks for your comments.
Sidhu says
Awesome Mukesh nicely presented
Can you share ALM and Selenium Integration
Mukesh Otwani says
Hi Sidhu,
I have not tried ALM with Selenium 🙁
Mohanraj says
Mukesh, your site rocking and its very useful for me. keep posting
Mukesh Otwani says
Thanks Mahanraj. Keep visitng and let me know if any help required from my side.
Sibyl says
This website is really interesting. I have bookmarked it.
Do you allow guest post on your site ? I can provide hi
quality posts for you. Let me know.
Mukesh Otwani says
thanks Sibyl. Yes I do allow guest post 🙂 I would be happy if you can contribute some quality post.