Posts

How to authenticate alert popup using Selenium

Image
  Solution : Use the following code. Example is given in using Firefox. String url = "https://dev20.***********.com/************"; String username = "s*****"; String password = "e******"; System.setProperty("webdriver.gecko.driver", "Geckodriver\\v0.21.0-win64\\geckodriver.exe"); WebDriver   driver = new FirefoxDriver(); String urlTemp = url.replaceFirst("https://", ""); String URL = "https://" + username  + ":" + password + "@" + urlTemp; driver.get(URL); ............................................................................................................... My failed attempt  #01: The following code didn't for me & provide Error:    "org.openqa.selenium.UnsupportedCommandException: POST /session/ef0fb2c1-e4c1-4d63-bab7-6a8fbe03af8b/alert/credentials did not match a known command" String url = "https://dev20.***********.com/************"; Stri

How to secure java code [jar file]

 I have been searching an easy way to encrypt my code to ensure my java code security. I have found an easy solution (free solution), May be you might like it :  I'm useing jCrypt.jar for this here. Go download the file.     source : https://github.com/wille/jcrypt/releases How to use jCrypt.jar to encrypt jar file ?  Step 01 : Make sure you have jCrypt.jar & Bin.jar in the same directory.  Step 02: Double click jCrypt.jar file. Step 03: Click Browser button & select the jar file you want to encrypt.  & click next  Step 05 : Select your Mail file if not automatically selected the right one.  & click next  Step 06 : Select "Encrypt classes (Resources will be in .jar)" option & click next  Step 06 : Select the location along with file name where you want to write you file.  & click next  Done :) close the jCrypt. 

How to create Hyper link in JavaFx

     @FXML     void openBrowser(ActionEvent actionEvent){     if(Desktop.isDesktopSupported())     {         try {             Desktop.getDesktop().browse(new URI("http://technogearup.com/"));         } catch (IOException e1) {             e1.printStackTrace();         } catch (URISyntaxException e1) {             e1.printStackTrace();         }     }     } useful resource : https://www.reddit.com/r/javahelp/comments/4bqcci/how_to_make_a_link_hyperlink_in_javafx/

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: argument type mismatch

Image
Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: argument type mismatch at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.Trampoline.invoke(Unknown Source) at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at sun.reflect.misc.MethodUtil.invoke(Unknown Source) at javafx.fxml.FXMLLoader$MethodHandler.invoke(FXMLLoader.java:1769) Solution : 

How to solve "flutter requires android sdk 28 and the android build tools 28.0.3" issue

Image
I was trying to install flutter in windows 10 PC. after running "flutter doctor" in the console the problem appears : "flutter requires android sdk 28 and the android build tools 28.0.3" Solution :  Step 01 : Open project File > Project structure Step 02 : Project > Select Android API ... Platform Result :  Now I can run the project properly

Setup & configure IDE for Grails

Mar 26 2019 : Eclipse latest version is not working with grails                        Intellij Community Edition don't suppost grails                        Best option Intellij Ultimate Edition , but not free -> install "eclipse-jee-luna" -> install "Grails Tool Suite" plugins -> download "Windows installer" 2.5.6 & install from https://groovy.apache.org/download.html setup environment variable check in command line : groovy -v & groovyconsole

How to solve Android Studio rendering problem

Image
Android Studio can't render. After adding components I can't see anything in the screen. here's what i get : I have the following Error on the screen: It says: Render Problem :  Failed to load AppCompat ActionBar with unknown error. if you get issue like this please check out solution below, hope that will solve your problem. SOLUTION: Go to >> build.gradle(Module: app) :  DELETE  >> implementation 'com.android.support:appcompat-v7:28.0.0-rc02' ADD >> implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'  [now it's not working, see the solution below this page] Then >> Sync now Just after 3 weeks get the same issue New Solution :    this time i change the following things, now it's working. Go to >> build.gradle(Module: app) :  replace  'com.android.support:appcompat-v7:28.0.0-alpha1' /  com.android.support:appcompat-v7:28.0.0-rc02  with  implementation &