Monthly Archives: September 2017

Open Browser using Python and without webdriver

import webbrowser webbrowser.open(‘https://www.google.com/’) Advertisements

Posted in Python, Uncategorized | Leave a comment

Print Square root of Array using numpy

import numpy as np arr=np.array([5,10,15]) print(np.sqrt(arr))

Posted in Python, Uncategorized | Leave a comment

ChromeDriver error “unknown error: cannot get automation extension”

Use: ChromeOptions options = new ChromeOptions();ChromeOptions options = new ChromeOptions(); options.addArguments(“disable-infobars”); options.addArguments(“disable-extensions”);

Posted in Uncategorized | Leave a comment

Using Mockito and Testng in Java

I am using maven and have imported maven dependency for Mockito . import static org.mockito.Mockito.*; import java.util.List; import org.testng.annotations.Test; public class TestMockito { /** * Test Mockito using Java and TestNG. */ @Test public void testmock() { @SuppressWarnings(“unchecked”) List<String> list … Continue reading

Posted in Java, TestNG, Uncategorized | Leave a comment

Import Certificate

First get site certificate from Firefox. Open website then click the Lock icon on left hand side. Save the certificate locally. Then execute the below command: C:\Program Files\Java\jdk1.8.0_144\jre\lib\security>keytool -import -alias example -keystore cacerts -file staginglendingtreecom.crt Enter keystore password: Password is … Continue reading

Posted in Uncategorized | 1 Comment

Abstract Class and keyword Java

http://xahlee.info/java-a-day/abstract_class.html

Posted in Uncategorized | Leave a comment

Great Link for Interviewers

http://www.developersbook.com/corejava/interview-questions/corejava-interview-questions-faqs.php

Posted in Uncategorized | Leave a comment