Posts

Soap UI API Interview Question

 1- Difference between soap and rest API : SOAP stands for Simple Object Access Protocol## REST stand for Representational State Transfer. SOAP is a protocol. SOAP was designed with a specification. It includes a WSDL file that has the required information on what the web service does in addition to the location of the web service## REST is an Architectural style in which a web service can only be treated as a RESTful service if it follows the constraints of being Client Server Stateless Cacheable Layered System Uniform Interface SOAP cannot make use of REST since SOAP is a protocol and REST is an architectural pattern.##REST can make use of SOAP as the underlying protocol for web services, because in the end it is just an architectural pattern. SOAP can only work with XML format. As seen from SOAP messages, all data passed is in XML format.##REST permits different data format such as Plain text, HTML, XML, JSON, etc. But the most preferred format for transferring data is JSON. 2...

Selenium Interview preparation

Click Element functionality : public void clickElement(WebElement element){ try{ element.click(); }catch(Exception e){ e.printStackTrace(); System.out.println(element +" not clicked"); } Generate random number: public String generateRandomNumber(int length) { char[] chars = "1234567890".toCharArray(); StringBuilder sb = new StringBuilder(); Random random = new Random(); for (int i = 0; i < length; i++) {     char c = chars[random.nextInt(chars.length)];     sb.append(c); } String output = sb.toString(); return (output); } Get first row data : public WebElement getFirstRow() {   return  firstRowData;//xpath for 1st row from UI } Click with Action protected void clickWithAction(WebElement element) { Actions builder = new Actions(driver); builder.click(element).build().perform(); } DoubleClick : public void doubleClick(WebElement element) { Actions builder = new Actions(driver); ...

Maven

Image
Key Note: By default, eclipse comes with the maven project so no need to download maven. How to install maven project in eclipse ide Open eclipse>Navigate to file>New>click on Project Click on maven project>Next>click on create sample project check box>Next New Maven project page open>Fill all Group id, Artifact id>click on finish Here maven project is created>below is the maven project screenshot src/main/java-source file src/main/resources-resources file like a picture,XML file etc src/test/java-test file like your test cases src/test/resources- resources for  test case Let's open  pom.xml file>To see pom.xml in XML format>click on below highlighted pom.xml file Here we can see in XML format>Here is the 4 element>grouped, artifact id and version which we have given>pom.xml contain the information contains which we...

Amazing Computer Keyboard Shortcut Keys

Create a virtual desktop(clean desktop): Windows key + Ctrl +D , For Mac : Ctrl+UP Switch between virtual desktop:  Windows key + Ctrl (If u want to switch in between use left and right arrow key ) ,  For Mac:  Ctrl If u no longer need any desktop spaces you can close by  Windows key + Ctrl +F4,   For Mac:  option key+X Too many apps open if u want to minimize at once :  Windows key + M Open an App in the taskbar:   Windows key + 1 to 9 (any number as per your app schedule) Split-screen in desktop: (open one app) Windows key +leftarrow and (open another app ) Windows key +rightarrow Switch App:   Ctrl+Windows key+Tab ,  For Mac : Ctrl+Tab Windows task view: Windows+ Tab Swapping program: Alt+Tab Open task manager: Ctrl+Shift+Esc,  For Mac:Command+Option+Esc Open File explorer:   Windows+ E Enhance pic or magnified pic:  Windows + +  Or - Take a screenshot: Windows+PrtSc ...

Running gem5 with parsec benchmark

Image
  Running gem5 with parsec benchmark 1. Run the command to run parsec benchmark for x264 program using script ./build/X86/gem5.opt –stats-file=test2a.txt configs/example/fs.py –disk-images=/home/dell/gem5/full-system-images/disks/x86root-parsec.img- script=parsec/x264_4c_simsmall.rcs