Difference between action.build().perform() and action.perform()

By Published:

In Webdriver, handling keyboard events and mouse events (including actions such as Drag and Drop or clicking multiple elements With Control key) are done using the advanced user interactions API . It contains Actions and Action classes which are needed when performing these events. In order to perform action events, we need to use org.openqa.selenium.interactions.Actions class.

The build() method is used compile all the listed actions into a single step.
we have to use build() when we are performing sequence of operations and no need to use only if we are performing single action.

example where build() required
Actions builder = new Actions(driver);
builder.clickAndHold((WebElement)listItems.get(0)).clickAndHold((WebElement)listItems.get(3)).click().build().perform();


in the above code we are performing more than one operations so we have to use build() to compile all the actions into a single step

example where build is not required

WebElement draggable = driver.findElement(By.id("draggable")); 
WebElement droppable = driver.findElement(By.id("droppable")); 
new Actions(driver).dragAndDrop(draggable, droppable).perform();
in the above code we are performing just a single operations so no need to use build()

Scrolling web page with Webdriver using java

By Published:
We can scroll the web page using javaScript Executor or You can use the "org.openqa.selenium.interactions.Actions" class to move to an element:


Following classes you required in you java code
import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement;
import org.openqa.selenium.Alert; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor;

1. We may require to scroll to bottom of the page and then perform operations. For this scenario we can use following code
((JavascriptExecutor) driver).executeScript("window.scrollTo(0, document.body.scrollHeight)");

2. Some times, we may require to scroll to particular element and peform operations on that particular element. For this we need to pass the element on which we need to perform operation. For this scenario we ca use following code
WebElement element = driver.findElement(By.linkText("googleMap")); ((JavascriptExecutor) driver).executeScript("arguments[0].scrollIntoView();", element);
OR
WebElement element = driver.findElement(By.id("my-id"));
Actions actions = new Actions(driver);
actions.moveToElement(element);
actions.perform();

3. We can also use the coordinates to scroll to particular position by passing the coordinates. For this scenario we use following code
((JavascriptExecutor) driver).executeScript("window.scrollBy(0,500)");

How to Re-Sign an iOS App from an External Developer/

By Published:


iReSign allows iDevice app bundles (.ipa) files to be signed or resigned with a digital certificate from Apple for distribution. This tool is aimed at enterprises users, for enterprise deployment, when the person signing the app is different than the person(s) developing it.


If you ever work with 3rd party developers, you know that getting the final project into production can take two different routes. You can either let the developer push the code/project into production or they hand it over to your internal team to release. There are pros and cons for each, but I always prefer to publish things ourselves since it reduces security concerns and gives us more control. The Apple App Store is no different, and it is actually really simple to take a developer app and turn it into an App Store version for submission.

Note: You can use this exact same process to resign the app to your developer certificate and profile, so you can install it on your own registered developer devices.

Step 1: Pull the latest iResign code from Github “$ git clone https://github.com/maciekish/iReSign.git”

Step 2: Build the code from Xcode

Step 3: In the window that appears “Enter the path to valid provisioning profile”, “Leave the fields to .plist file blank” and “Enter the build identifier from application”

Step 4: From the drop-down "Select valid developer profile” and click on "ReSign!” button.



Note: Resigned file will be saved to same directory as of original application.

Advantage:


  • We now have to ask from client just .ipa file for automating on iOS platform, same as we require just .apk file for automating on android platform

Refer the below link for more reference

https://github.com/maciekish/iReSign

http://dev.mlsdigital.net/posts/how-to-resign-an-ios-app-from-external-developers/


HOW TO UNINSTALL JENKINS

By Published:

How to uninstall Jenkins on Mac system

1.    Execute from terminal
          /Library/Application Support/Jenkins/Uninstall.command
2.    Or use Finder to navigate into that folder and double-click on Uninstall.command.
3.    If the uninstallation script cannot be found, use:
      sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist
      sudo rm /Library/LaunchDaemons/org.jenkins-ci.plist
      sudo rm -rf /Applications/Jenkins "/Library/Application Support/Jenkins"     /Library/Documentation/Jenkins
4.    if you want to get rid of all the jobs and builds:
  sudo rm -rf /Users/Shared/Jenkins
5.  to delete the jenkins user and group (if you chose to use them):
       sudo dscl . -delete /Users/jenkins
       sudo dscl . -delete /Groups/jenkins


  Baby Products

To know all devices connected to machines / simulator information on mac machine

By Published:
Open the terminal type following command:

$ instruments -s deivces


Known Devices:
mobileQA’s Mac mini [303FD57A-BA31-5AF8-BBC4-85D1F3FF38A3]
Resizable iPad (8.0 Simulator) [5C7AFC61-6B75-49DE-9B28-4CCD125A1F24]
Resizable iPhone (8.0 Simulator) [D88F397A-98B4-4CE7-A625-230A56730086]
iPad 2 (7.0.3 Simulator) [C2C72D3E-147C-4796-90DD-682E4DBD469E]
iPad 2 (7.1 Simulator) [696557BE-7723-49A3-ADA6-46090B2576FB]
iPad 2 (8.0 Simulator) [3395DD16-17E6-4A69-BAB2-D7414759E04B]
iPad Air (7.0.3 Simulator) [1432341A-C3DD-47B8-95D4-5F17C08BF4A7]
iPad Air (7.1 Simulator) [14C9A977-4D56-404A-897F-F5DE8F5F7208]
iPad Air (8.0 Simulator) [F92E44D9-8E3F-43D2-9124-00C688126AED]
iPad Retina (7.0.3 Simulator) [4FFA8E0D-290A-47BB-B7D6-806641AFAEF7]
iPad Retina (7.1 Simulator) [76F3CC43-0E3A-4ADD-9520-AA1E20F8DD71]
iPad Retina (8.0 Simulator) [DC9C5DFA-988B-40A5-8E81-3F3FB0D11043]