Author: Manoj Kolhe

  • Blog
  • Author: Manoj Kolhe

SugarCRM Automation Testing of Filters using Selenium Webdriver

Why SugarCRM Automation Testing of Filters required? SugarCRM has allot of Vendors for Customer Relationship ,to manage and access Vendors required records sugarCRM provide efficient filtering system. Here, user can select Vendor ID, Member, Contact ID, etc. all filtering done by SugarCRM Automation Testing How? For Automation testing on filters need to handle two Actions Mouse Over action on Menu In SugarCRM most of the options are hidden under Menu or sub-Menus In order to perform a ‘mouse hover’ action, we need to chain all of the actions that we want to achieve in one go. So move to the element that which has sub elements and click on the child item. With the actions object you should first move the menu title, and then move to the sub menu item and click it. In order to perform action events, we need to use “org.openqa.selenium.interactions.Actions” class Move Menu item  : Invoice & Transactions  WebElement element = driver.findElement(By.linkText(“Invoice & Transactions”));  Actions action = new Actions(driver); action.moveToElement(element).build().perform() Click on Child item : Invoicedriver.findElement(By.linkText(“Invoice”)).click(); Here ‘build()’ method is used to compile all the list of actions into a single step and ready to be performed. We need to use perform() to execute the action. MULTIPLE WINDOWS ON SUGARCRM TO SEARCH VENDOR In SugarCRM filters has to open different window to select particular value to have required report. So, Now We have an to deal with multiple windows in Automation Testing has always been a little tricky and require an extra effort. The entire process can be fundamentally segregated into following steps: Step 1 : Clicking on Link for Vendor ID on SugarCRM 1st window A new Window with list of Vendor is opened. Step 2 : Move Focus from SugarCRM 1st window to Vendor Window Vendor Window is active now Code : for (String winHandle : driver.getWindowHandles())     {  driver.switchTo().window(winHandle);  } Step 3 : Perform Actions on Vendor Window Complete the entire set of Actions Step 4 : Move Focus from Vendor Window to SugarCRM 1st window SugarCRM 1st window is active now Let’s implement above steps in Eclipse with Selenium Webdriver on SugarCRM //get SugarCRM Window (Parent Window) String parentWindowHandle = driver.getWindowHandle(); System.out.println(“Parent window’s handle -> ” + parentWindowHandle); //Switch window from Parent window to Search Vendor Window driver.findElement(By.xpath(“//*[@id=’tmf_Invoicebasic_searchSearchForm’]/table/tbody/tr[3]/td[6]/span/button[1]”)).click(); for (String winHandle : driver.getWindowHandles()) { driver.switchTo().window(winHandle); // switch focus of WebDriver to the next found window handle if(!parentWindowHandle.equals(winHandle)) break; } driver.findElement(By.xpath(“//*[@id=’name_advanced’]”)).sendKeys(“prathama”); driver.findElement(By.id(“search_form_submit”)).click(); driver.findElement(By.xpath(“/html/body/table[4]/tbody/tr[3]/td[1]/a”)).click(); //Switch window back to SugarCRM Window driver.switchTo().window(parentWindowHandle); driver.findElement(By.id(“search_form_submit”)).click(); Please see the below video to see how SugarCRM Automation Testing on Filters  works For more details for implementing Automation Testing for SugarCRM please contact here.

Install Node Js from Ubuntu Packages

Install Node Js from Ubuntu Packages Introduction Node.js is a JavaScript platform for general-purpose programming that allows users to build network applications quickly. By leveraging JavaScript on both the front- and back-end, development can be more consistent and designed within the same system. Node JS is required to run the UI of the Explorer and interact with coin to fetch the data and insert the same into Mongo DB. There are several ways to install node js 1. Binary Installation. To install Node JS from Binary  click here 2. Installation from Source Code. To install Node JS from Source Code Click Here 3. Installation from Ubuntu Packages. we are going to install Node JS from Installation from Ubuntu Packages.  Install Node.js with Ubuntu Package Manager Step 1: To install Node.js, execute the following command in your terminal sudo apt-get install nodejs Step 2: install the Node package manager sudo apt-get install npm Step 3: Create a symbolic link for a node sudo ln -s /usr/bin/nodejs /usr/bin/node Step 4: Check the version $ node -v v0.10.25 $ npm -v 1.3.10 Install Node.js with Maintained Ubuntu Packages Step 1: Add the Node.js-maintained repositories to your Ubuntu package source list curl -sL https://deb.nodesource.com/setup | sudo bash – Step 2: install Node.js with apt-get sudo apt-get install nodejs Step 3: create a symbolic link for the node sudo ln -s /usr/bin/nodejs /usr/bin/node Step 4:  Check the version $ node -v v0.10.44 $ npm -v 2.15.0 If you see the versions displayed for node and npm, you have successfully compiled Node.js with npm from Packages.

Pointing domain to an Cryptocoin explorer

Domain Pointing DNS (Domain Name System) allows us to reference computers by easy-to-remember domain names, like example.com  instead of IP addresses. DNS records define which IP addresses map to which domain names and how to handle other kinds of requests a domain might receive. To set up a domain name, you need to do two things. First, you need to purchase a domain name from a domain name registrar. Second, you need to set up DNS records for your domain by using a DNS hosting service. Domain Pointing using Godaddy.com Step 1: Login to Godaddy.com Step 2: My Products – > My Domains Step 3: Select Your Domain -> Manage DNS Step 4: Edit Your domain Step 5: Change Points To IP address and save Configuring Apache Step 1: Create yourDomainName.conf file. vim /etc/apache2/sites-available/yourDomainName.conf Step 2: Add following code And change the Domainname.com with your domain name. <VirtualHost *:80> ServerAdmin webmaster@yourDomainName ServerName yourDomainName ServerAlias yourDomainName DocumentRoot /var/www/html/blogs/techaroha_wordpress/yourDomainName ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> <Directory /var/www/html/blogs/techaroha_wordpress/yourDomainName> Options Indexes FollowSymLinks MultiViews AllowOverride all Order allow,deny allow from all </Directory> Step 3: Execute following commands. sudo a2ensite yourDomainName.conf sudo service apache2 restart installing SSL certificate on a Domain Step 1: Create a directory name yourDomainName on following path /etc/ssl/certs/ Step 2: Navigate to /etc/ssl/certs/yourDomainName Step 3: Go to Website https://www.sslforfree.com/ And login Step 4: Enter Domain Name then Click on Manual Verification and Verify Your Domain. Step 5: You will get 3 files 1- Certificate 2- Private Key 3- ca-bundle Step 6: Create three files with extensions .key, .crt , .ca-bundle in yourDomainName directory. /etc/ssl/certs/yourDomainName/yourDomainName.key /etc/ssl/certs/yourDomainName/yourDomainName.crt /etc/ssl/certs/yourDomainName/yourDomainName.ca-bundle Step 7: Add following code And change the yourDomainName.com.conf with your domain name. <VirtualHost *:443> ServerName yourDomainName ServerAdmin webmaster@yourDomainName ServerAlias yourDomainName DocumentRoot /var/www/html/blogs/techaroha_wordpress/yourDomainName ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined SSLEngine on SSLCertificateFile /etc/ssl/certs/yourDomainName/yourDomainName.crt SSLCertificateKeyFile /etc/ssl/certs/yourDomainName/yourDomainName.key SSLCertificateChainFile /etc/ssl/certs/yourDomainName/yourDomainName.ca-bundle </VirtualHost> Step 8: Execute the commands sudo a2ensite yourDomainName.conf sudo a2enmod rewrite sudo a2enmod ssl sudo service apache2 restart Step 9: Create a .htaccess file to force https and Place below code in the file RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yourDomainName.com/$1 [R,L] proxy Server Step 1: to enable proxy execute following commands sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod proxy_balancer sudo a2enmod lbmethod_byrequests sudo systemctl restart apache2 Step 2: Add following code in yourDomainName.com.conf  file <VirtualHost *:80> ProxyPreserveHost On ProxyRequests Off ServerName yourDomainName ServerAlias yourDomainName ProxyPass / http://localhost:3001/ ProxyPassReverse / http://localhost:3001/ </VirtualHost> Step 3: save file and execute the following command sudo service apache2 restart

Install MongoDB in Ubuntu Step by Step Guide

Install MongoDB  in Ubuntu Introduction Mongo DB serves as a back-end to  Explorer. All the transaction in blockchain is also stored in Mongo DB. MongoDB is a free and open-source NoSQL document database used commonly in modern web applications. This tutorial will help you set up MongoDB. Install MongoDB step 1: Reload local package database. sudo apt-get update step 2: Install the MongoDB packages. sudo apt-get install -y mongodb-org step 3: Install a specific release of MongoDB. To install a specific release, you must specify each component package individually along with the version number, as in the following example: sudo apt-get install -y mongodb-org=3.6.0 mongodb-org-server=3.6.0 mongodb-org-shell=3.6.0 mongodb-org-mongos=3.6.0 mongodb-org-tools=3.6.0 step 4: Start MongoDB. sudo service mongod start Once Mongo DB is installed we need to create the database which will be by iquidus explorer and set up the credentials for that. Please click here to create the database  and  set up the credentials