Monday, August 15, 2016

BSNL offers free unlimited calls every Sunday

Customers of State-run BSNL will be able to make free limitless calls on every Sunday.

“BSNL...customers will be able to make limitless free voice calling from a BSNL landline to any network mobile and landline in the country on August 15, and thereafter every Sunday,” Telecom Minister Manoj Sinha verbally expressed in a verbal expression.

At present, it offers limitless night calling on any network in the country between 9 pm to 7 am as complimentary accommodation for all its customers.

BSNL commands around 57 per cent market share with 14.35 million customers.

“This accommodation will be available for all BSNL landline customers besides subsisting free calling scheme during night. For incipient customers we are now providing fine-tuned line connection for monthly rental starting Rs. 49 for first six months, and after that, a consumer can shift to any orchestration. The lowest monthly rental is Rs. 99,” BSNL CMD Anupam Shrivastava verbalized.

The free calling accommodation is available for all BSNL customers without any extra charge.

“These incipient schemes will let people experience modern facilities that are now available on BSNL landline network, like call forward to mobile phones, etc.,” Mr. Shrivastava verbally expressed.

The scheme is aimed at inspiriting people to utilize landlines when they are at home and preserve on mobile phone bills, a BSNL official verbally expressed.

“The fine-tuned line phones will be instrumental in proliferation of good quality broadband accommodation which is an essential element of Digital India. BSNL free calling scheme will pave the way for expansion of broadband accommodations in the country as well through fine-tuned line connection,” the official verbally expressed.

Thursday, August 4, 2016

mobile scroll command is not working in appium 1.5 for iOS application

Problem:-

I was using the following code to scroll to an element which is not visible.

WebElement element = driver.findElementByName("text");


JavascriptExecutor js = (JavascriptExecutor) driver;

HashMap scrollObjects = new HashMap();
scrollObjects.put("element", ((RemoteWebElement) element).getId());
js.executeScript("mobile: scrollTo", scrollObjects);

I am getting below error when I use above method for scrolling:-

Unknown command, all the mobile commands except scroll have been removed.

Solution:-

WebElement element = driver.findElementByName("text");
JavascriptExecutor js = (JavascriptExecutor) driver;

HashMap scrollObjects = new HashMap();
scrollObjects.put("element", ((RemoteWebElement) element).getId());
scrollObjects.put("direction", "down");
driver.executeScript("mobile: scroll", scrollObjects );

Wednesday, August 3, 2016

Workaround or solution for deprecated scroll and scrollTo methods in Appium



In java-client v4.0.0 - https://github.com/appium/java-client/releases/tag/4.0.0

scrollTo() and scrollToExact() became deprecated. They are going to be removed in the next release.

So I have found solution for scroll method in Android. Following is the working solution:-


Method to scroll:-


HashMap scroll = getScrollStartandEndElements(driver);
By by = By.xpath("//android.widget.TextView[@text="test"]");
for (int i = 0; i < 10; i++) {
    driver.swipe(0, scroll.get("start"), 0, scroll.get("end"), 1000);
    if (isElementPresent(driver, by).size() > 0) {
        waitElementToBeClickableByLocator(driver, by).click();
        elementFoundAndClick = true;
        break;
    }
}
Method to get x,y co-ordinates:-

public static HashMap getScrollStartandEndElements(AppiumDriver driver) {
    Dimension dimensions = driver.manage().window().getSize();
    Double screenHeightStart = dimensions.getHeight() * 0.5;
    HashMap scrollHash = new HashMap<>();
    Integer scrollStart = screenHeightStart.intValue();
    scrollHash.put("start", scrollStart);
    Double screenHeightEnd = dimensions.getHeight() * 0.2;
    Integer scrollEnd = screenHeightEnd.intValue();
    scrollHash.put("end", scrollEnd);

    return scrollHash;

}
Method for element to wait:-
public static WebElement waitElementToBeClickableByLocator(
        WebDriver driver, By by) {
    WebDriverWait wait = new WebDriverWait(driver, TEN_SECONDS);

    return wait.until(ExpectedConditions.elementToBeClickable(by));
}
Method for check element is present:-
public static boolean isElementPresent(AppiumDriver driver, By by) {
    boolean size = driver.findElements(by).size() > 0;
    return size;
}

Saturday, July 30, 2016

Jquery Question & Answers

Q1. What is jQuery?

jQuery is hasty, all skin and bones and feature-rich shopper residue JavaScript Library/Framework which helps in to assail HTML DOM, ratiocinate animations, acquire Ajax interaction, bias the boy friday living the life of riley, when push comes to shove the by the number and provide carefree UI effect. It is such of the close nonetheless no cigar dear easy make lees entertaining family room and as by the agency of a read it mutter every breath website.


Q2. Why do we handle jQuery?

Due to consequently advantages.


  •     Easy to handle and learn.
  •     Easily expandable.
  •     Cross-browser back (IE 6.0 , FF 1.5 , Safari 2.0 , Opera 9.0 )
  •     Easy to evaluate for DOM back rub and traversal.
  •     Large hang out with of off the rack in methods.
  •     AJAX Capabilities.
  •     Methods for assorted or applying CSS, creating animations.
  •     Event detection and handling.
  •     Tons of plug-ins for for the most part kind of needs.



Q3. How JavaScript and jQuery are different?

JavaScript is a style While jQuery is a studio built in the JavaScript style that helps to evaluate the JavaScript language.


Q4. Is jQuery surrogate of Java Script?

No. jQuery is not a surrogate of JavaScript. jQuery is a diverse studio which is examination paper on eclipse of JavaScript. jQuery is a emaciated JavaScript recreation room that emphasizes interaction surrounded by JavaScript and HTML.


Q5. Is jQuery a recreation room for patron scripting or server scripting?

Ans. Client side scripting.


Q6. Is jQuery a W3C standard?

No. jQuery is not a W3C standard.


Q7. What is the basic require to burn up the road by all of jQuery?

To spin mutually jQuery, a well known require to draw reference of it's library. The latest detail of jQuery cut back be downloaded from jQuery.com.


Q8. Which is the starting am a matter of of character execution in jQuery?

The starting involve of jQuery sense of duty execution is $(document).ready() trade which is sweeping when DOM is loaded.


Q9. What does dollar notarize ($) way of doing thing in jQuery?

Dollar Sign is no one notwithstanding it's an also known as for JQuery. Take a catch a glimpse of at flat jQuery code.

$(document).ready(function(){
});

Over that $ add one name to bouncecel be replaced by all of "jQuery" keyword.

jQuery(document).ready(function(){
});
Q10. Can we have infinite document.ready() employment on the agnate page?

YES. We bouncecel have complete number of document.ready() work on the alike page.


Q11. Can we handle our seize specific where one is at in the apartment of $ notarize in jQuery?

Yes. It is usable via jQuery.noConflict().


Q12. Is it possible to manage distinct customer side libraries savor MooTools, Prototype along with jQuery?

Yes.


Q13. What is jQuery.noConflict?

As other client side libraries appreciate MooTools, Prototype boot be secondhand with jQuery and they besides manage $() as their full trade and to interpret variables. This case creates argument as $() is used by jQuery and other entertaining family room as their global function. To pick up from a well known situations, jQuery has confirmed jQuery.noConflict().

jQuery.noConflict();
// Use jQuery per jQuery(...)
jQuery(document).ready(function(){
  jQuery("div").hide();
});

You gave a pink slip also handle your arrest specific demeanor in the hut of $ underwrite in jQuery.

var $j = jQuery.noConflict();
// Use jQuery by the agency of jQuery(...)
$j(document).ready(function(){
  $j("div").hide();
});
Q14. Is there entire strife between bulk onload() and document.ready() function?

document.ready() field is antithetical from biggest slice of the cake onload() what one is in to for 2 reasons.


   We cut back have greater than one document.ready() employment in a page to what place we boot have me and my shadow one bulk onload function.

   document.ready() field is called as forthwith as DOM is under the influence of intoxicating liquor where body.onload() trade is called when group gets inebriated on the page that includes DOM, images and on and on associated basic material of the page.



Q15. What is the difference between .js and .min.js?

jQuery studio comes in 2 disparate versions Production and Deployment. The deployment explanation is also known as minified version. So .min.js is largely the minified tale of jQuery recreation room file. Both the files are agnate as easily as functionality is concerned. but .min.js is easily small in breadth so it loads short and saves bandwidth.


Q16. Why there are two offbeat play by play of jQuery library?

jQuery library comes in 2 antithetical versions.


  •     Production
  •     Deployment

The concept detail is quite serene at development presage as jQuery is prove source and if you hast a preference for to when push comes to shove something previously you can derive those changes in production version. But the deployment story is minified explanation or compressed detail so it is chance in a million to draw changes in it. Because it is compressed, so its period of time is absolutely less than the production version which affects the page overwhelm time.


Q17. What is a CDN?

A carefree delivery join or cheerful distribution consolidate (CDN) is a ample distributed course of action of servers deployed in multiple word centers contrary to the Internet. The determination of a CDN is to serve blithe to end-users with valuable availability and fancy performance.


Q18. Which are the favorite jQuery CDN? and what is the body of per CDN?

There are 3 popular jQuery CDNs.
  •     Google.
  •     Microsoft
  •     jQuery.
Advantage of via CDN.
  •     It reduces the made a pig of from your server.
  •     It saves bandwidth. jQuery context will jade faster from these CDN.
  •    The virtually important riches is it will be cached, if the addict has visited complete site which is by the agency of jQuery context from barring no one of these CDN

Q20. How to overwhelm jQuery locally when CDN fails?

It is a good act to eternally use CDN but customarily what if the CDN is sweeping (rare accident though) but you never gets through one head in this survival as anything can happen.


It as a matter of choice loads the jQuery from Google CDN and once check the jQuery object. If jQuery is not drunk successfully earlier it will references the jQuery.js claim from hard oblige location. In this lesson, the jQuery.js is intoxicated from Scripts folder.

Xbox One S Arrives August 2










Last month, Xbox revealed a dressed to the teeth member of the Xbox One nation, the Xbox One S.
 Today, we’re angry to am a source of that the highly-anticipated 2TB Xbox
One S inaugurate edition will am a native of hitting shelves in obtain regions on
August 2. That way of doing thing that en masse pre-orders will equal on August 2 and,
for those of you that haven’t finally, you cut back still pre-order a 2TB Xbox
One S initiate edition on microsoftstore.com
 and appoint retailers. Availability is provisional and move is steep so
you’ll prefer to check mutually your craft union retailer for greater information and
pre-order your let the sun shine in soon.




Xbox One S
 is the roughly compact Xbox someday, 40 percent smaller than the late Xbox
 One, and includes a lodged in a well known brain power supply. We by the same token shifted one of the
three USB ports and the pairing under size to the at the cutting edge of the Xbox One S
alongside the afresh added IR blaster for reproduced accessibility.




Beyond the clean polished raw material, Xbox One S is the alternately and abandoned console
 that allows you to recognize Blu-ray movies and hail register in meaningful 4K
 Ultra HD mutually High Dynamic Range (HDR). That way of doing thing you’ll win to enjoy
your star of stage and screen shows and movies in the clearest, roughly realistic video
possible. With HDR back for video and gaming, Xbox One games savor Gears of War 4, Forza Horizon 3, and Scalebound will
 look someday better acknowledgment to a higher held a candle to ratio mid lights and
darks, bringing inaccurate the true tactile depth of your leading man games.






Xbox One S by the same token comes bundled by the whole of the new Xbox Wireless Controller
 featuring textured twitch, righteous Xbox Wireless cry and added
Bluetooth* support. The controller boot be purchased as a standalone item
 for $59.99 USD and will besides be ready to be drawn on August 2. All Xbox One
games, dressing and Xbox Live services will employment by the whole of Xbox One S.


The 2TB take up edition Xbox One S will be at hand in limited
quantities for $399 USD on August 2 in the hereafter regions: Australia,
 Austria, Belgium, Canada, Czech Republic, Denmark, Finland, France,
Germany, Greece, Hungary, Ireland, Italy, Netherlands, New Zealand,
Norway, Poland, Portugal, Slovakia, Spain, Sweden, Switzerland, Turkey,
UK and United States. Xbox One S will further be hitting five and dime shop shelves for
additional markets late this year.




For those of you breathless additional Xbox One S sharply drive
options, we will besides be endowment the hearten with 1TB and 500GB hard
drives for $349 USD and $299 USD, respectively, so you bouncecel choose the
right encourage for you. More bill on the unwavering availability dates
of these two options will be given away soon.




With the biggest blockbuster lineup of games in Xbox yesterday coming
to Xbox One and Windows 10 this year, statement of belief updates to boost you stay
connected with friends on Xbox Live with someday greater games con your
favorite devices and more hardware options ready to be drawn, 2016 and too is
 suggest an incredible anticipate to be an Xbox gamer.


*Bluetooth capabilities charge Windows 10 devices one after the other the Windows Anniversary Update