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.
Hi Mukesh,
how to get diasabled dropdown value using selenium
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.
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
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.
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
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)
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:-
Hi Rithesh,
You might be able to see img tag, try to click on it.
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
Hi Sagar,
Please debug your code to check error/exception.
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)
Hi Deepak,
Which chromedriver version are you using?
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
Hi Sreehari,
Please check this link http://learn-automation.com/use-firefox-selenium-using-geckodriver-selenium-3/
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?
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/
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.
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.
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”.
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/
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
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/
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.
Hi Hema,
If it is web based pop up then directly use Selenium otherwise try with AutoIT or robot class to avoid pop up.
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.
Hi Parthasarthi,
Thanks for your review. keep visiting my blog and also keep learning.
Be in touch…
Hi ,
Can u give clear explnation about wait commands .
And in which case we need to use those commands.
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/
Nice.
Hey Ranjan,
Thanks for your comments..:)
Hi Mukesh Otwani,
How we execute the java program in Jenkins on mac ?
Please tell me the step by step configuration step
Hi Shailendra,
Please check this link http://learn-automation.com/selenium-integration-with-jenkins/
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
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.
sir i don’t know about selenium plz suggest me step by step video from the basic selenium topic wise.
Hi Udit,
Please start from this link
thank you sir, I have a more question which eclipse is best for selenium testing
Hi Udit,
You can use eclipse latest version based on your system architecture (32Bit or 64Bit)
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
Hi Ashwary,
Please use fluent wait to handle this situation, more info on this link http://learn-automation.com/fluentwait-in-selenium-webdriver/
Hi Ashwary,
Use Fluent wait to handle this.
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
Hi Sonali,
Please check this http://learn-automation.com/find-broken-links-using-selenium/
Hi Mukesh,
How can I use single login script, if I pass ID of webElement or Xpath of webElement ??
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.
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
Hi Leo,
Thanks for your pleasing feedback. Please be in touch with learn-automation…:)
Hi Mukesh,
How to handle dynamic web table in selenium webdriver?
Hi Priya,
Please refer this link http://learn-automation.com/handle-calender-in-selenium-webdriver/
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.
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/
Sir I want know how to enter the password in gmail through xpath
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.
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.
Hi Sneha,
You can use link for your practice stuff https://orangehrm-demo-6x.orangehrmlive.com/
Hi Mukesh,
I need to clarify one doubt, how can upload the image using robot for mac users but there is no text box??
Hi Vinoth,
Please check this link http://learn-automation.com/upload-file-in-selenium-in-mac/
Hi Mukesh
I have one question
How to count how many number of rows and columns in our web page in selenium webDriver?
Hi Prashant,
Check this with dynamic xpath. Check //table then look for tr and td tags.
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?
Hi Dipesh,
Please check this link http://learn-automation.com/selenium-integration-with-jenkins/
Hi Mukesh,
How to handle an error that may happens anytime in any of the page ..
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.
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)
Hi Shardha,
It looks like you have run your automation script in chrome browser. Please update your chromedriver to atleast 2.28 version.
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
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/
Hi Mukesh,
Your videos and posts about automation are very fruitful appreciate your work
Hi Syed,
Very thanks for your overwhelming comments. Keep commenting your doubts, I’ll try my level best to clarify.
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?
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.
Hi mukesh..!
Your site is providing good knowledge for freshers and also kindly update the tutorial about Testng,maven,Pom,Modular driven Frameworks pleaw
Hi Ajay,
Thanks for your constructive comment…:)
Hi
UI testing is possible in automation
Hi Lavanya,
Yes, this is what Selenium does
Hii Mukesh
Thank you so much for your solution.
Thanks Aishwarya…:)
Hats off to your hard work Sir.You have explained each and every topic in detail.It’s helping me learning selenium.
Thanks Mohini…:)
Hey Mukesh,
Amazing stuff, thanku
Hi Pranshu,
Thanks for your comments.
Awesome Mukesh nicely presented
Can you share ALM and Selenium Integration
Hi Sidhu,
I have not tried ALM with Selenium 🙁
Mukesh, your site rocking and its very useful for me. keep posting
Thanks Mahanraj. Keep visitng and let me know if any help required from my side.
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.
thanks Sibyl. Yes I do allow guest post 🙂 I would be happy if you can contribute some quality post.