Skip to main content

Posts

I have been offered a Ferrari

Not for real :) I had a fun conversation with a recruiter on LinkedIn and jotting it down here. I have masked/removed the sensitive data - Hi Tarun, I lead the Tech division in XYZ - I'm pretty active in the XYZ tech scene so I wanted to introduce myself. Out of curiosity, how are things going in XYZ? Could a new job get your attention somehow...? (For example, a free Ferrari) I can't promise a new Ferrari (maybe a Porsche?) but I would like to know what will grab your attention (such as more responsibility or a salary increase). Then, I can keep your goals in mind and tell you about relevant opportunities. How does that sound? If now isn't the right time to move that's also okay. I'd still like to chat to you so that when you are ready, we've already gotten the introductions out of the way. :) Look forward to hearing from you!

Do you check for absence of element on page

When writing automated tests we often check presence or absence of element for assertion conditions. This is usually written as -  assertTrue("Element is missing. Bug!!!", pageObject. isSomeElementDisplayed()); And when element is not displayed then above mentioned assert statement fails. In the similar manner we can write following assert statement to check for absence of element -  assertFalse("Element is present. Bug!!!", pageObject. isSomeElementDisplayed()); Above mentioned assert statement would fail if element is displayed on page. Everything looks ok, is not it. Not really, there is catch. Let's have a closer look at assertFalse statement we used above -  assertFalse("Element is present. Bug!!!", pageObject. isSomeElementDisplayed()); This assert statement would also succeed even if webpage results in 404/500 or any other error page, since error page would also be missing the element on which we are p...

Test Java class with JMeter

It is quite easy to test API or Website using JMeter  but you may come across situation when you have to load test java class directly.  This post described how a java class can be load tested.  We will write a java program and use JMeter Java Sampler to load test it - Set up a maven selenium project. If you are new to java and maven then you may like to check my java tutorials Add following dependencies to your maven project (find out latest versions by searching https://search.maven.org/) -  < dependency >     < groupId > org.apache.jmeter </ groupId >     < artifactId > ApacheJMeter_core </ artifactId >     < version > 3.1 </ version > </ dependency > < dependency >     < groupId > org.apache.jmeter </ groupId >     < artifactId > ApacheJMeter_java </ artifactId >     < version > 3.0 </ v...

Thank you all !!!

As you all know few days ago my youtube channel was suspended. This was shocking since I never received any strike against my channel from google. I did not keep quiet and  requested  google to reactivate my channel and all of you have been very supportive in letting google know about importance of my channel. Today I got an email from google that my channel is active again. I want to show my gratitude to all of you for your support. Without you asking google to activate my channel, my channel would yet have been suspended. Thank you all and learning journey continues :)

Petition to Google to Reactivate my YouTube Account

I have been writing blogs and creating videos in the field of software testing for about 8 years. During this period I have helped thousands to software testing enthusiasts in learning test automation. I woke up to a shock yesterday that my you tube channel has been terminated. This is what you will see on my youtube channel - In my best of knowledge -  I never spammed any one Never used abusive language against any one. Never had any strike against my account.  The worse thing is that I have no backup of my video tutorial so all of my subscribes are going to be deprived of my video tutorials in future.  According to google , account owner is sent an email when account is terminated but I never received any mail. I regularly receive you tube promotional mail so it is highly unlikely that I would have missed this email. I have already appealed google about it and yet waiting to hear from them.  How can you help? If you think that my c...

File upload and WebDriver (Where is my File?)

You may have come across file upload use case when working with WebDriver. File upload is quite easy since it is same as typing in a text box but herein we need to pass path of file to be uploaded. I used to keep a static file in src/test/resources folder of maven project and would use it for upload operation. But you can also generate file during run time using java.nio.file.Files class. Files class has createTempFile(java.lang. String, java.lang.String, java.nio.file.attribute. FileAttribute...) method which can be used to generate temporary files. For ex, you can generate a temporary pdf file and get back the File object as following - File file = Files. createTempFile ( "test-" + accountNumber, ".pdf" ).toFile(); generatePDF (file, StringUtils. repeat ( "Dummy PDF" , 10 )); And this is how generatePDF looks - public static File generatePDF(File file, String content) { try { Document e = new Document(); ...