Selenium | Unable to find Command button using Selenium Webdriver

| By Webner

Problem: Unable to find the Command button using Selenium Webdriver. Solution: You can use following script code if you want to find command button on a web page and then click it: driver.findElement(By.xpath(“//button[text()='(Button name)’]”)).click(); Here is the script which we used in

Chargify | Single php function for all Chargify API calls

| By Webner

Following single function can be used for all Chargify API calls whether API calls belong to test site (site for test transactions) or live site (live transactions): <?php function sendRequest($uri, $method, $data = ”) { $apiKey = ‘XOTUsyy7pJ6yLgmMa233AtJ’; $subdomain =

Salesforce | [message:protected] => INVALID_LOGIN: Invalid username, password, security token; or user locked out

| By Webner

While upserting records using SFDC php API we were facing following exception : [message:protected] => INVALID_LOGIN: Invalid username, password, security token; or user locked out. This exception was showing up frequently when we were upserting records using PHP API. The

Salesforce Integration | Upsert multiple records with single connection in PHP

| By Webner

When we create connection with “SforceEnterpriseClient”, we can upsert one record and then we need to recreate connection for next upsert, which eventually can result in the exception: “UnexpectedErrorFault: REQUEST_LIMIT_EXCEEDED: TotalRequests Limit exceeded.” The solution is to use “SforcePartnerClient” instead

PHP | How to call SOAP based web services from php

| By Webner

We were working on codeigniter website project. We had wsdl web services available to access our backend functionality. We had configured a WSDL Client in our php code but it was not working. Sample Code: try { $testSoapClient = new

Google Maps | Display routes to different locations from common starting point

| By Webner

Suppose in Google Maps you want to display routes to different locations from common starting point. For this we need accurate lat/long of the origin and destination addresses (only 1 origin and multiple destinations). We will use following statement to

Mysql | Maximum execution time of 360 seconds exceeded at data import time

| By Webner

In one of the project we had to import some .csv files into Mysql database. Files were of size 80mb and more. When we tried to upload the files through phpmyadmin it was resulting in timeout error – Maximum execution

Salesforce | How to access php code in salesforce apex class

| By Webner

We can access the php code in salesforce using @future(callout=true/false). The function we make for accessing the php code in apex class is of static type and does not return any value. Syntax: @future(callout=true) public static void function_Name() { //variable