Thursday, 30 March 2017

How to solve WiFi detection problem in Ubuntu


If you are stuck at WiFi detection issue just after a fresh Ubuntu installation, there could be many reasons for that. Most of the time it's because of the missing of the drivers. Though you can certainly install the required driver from the command line. But, it might be a cumbersome task for a newbie. Instead, you can try the most easiest solution given below.


1. Click on the “Search you computer icon” or press the Windows key/logo key/System key on the keyboard.


2. Search for Additional Drivers and Open it.


 3. Go to the Additional Driver Tab, and click on the Apply Change after selecting the option shown in the below picture.


That's it.....!!
Now you should be able to use your WiFi. It worked for me and I am pretty sure it will work for you as well. 



Thursday, 16 March 2017

Holi@HeaderLabs



Hello Everyone!!


Today I am not going to write anything related to Appium, Selenium or any other technical stuffs but the Holi Festival, which we celebrated last week here @HeaderLabs.



Holi is a colorful and most fun-filled festival which is celebrated in the month of March, usually in the latter half of the month. It is a festival, with dancing, singing, and throwing of powder paint and colored water. Numerous legends and stories associated with Holi celebration makes the festival more exuberant and vivid. The most popular one is related to the killing of Holika. The story centers around an arrogant king who wanted everyone in his kingdom to worship him. But his son Prahlad refused and worshiped Lord Vishnu instead. He attempts to kill his son but fails each time. Finally, the king’s sister Holika who is said to be immune to burning, sits with the boy in a huge fire. However, the prince Prahlada emerges unscathed, while his aunt burns to death. Holi commemorates this event from mythology, and huge bonfires are burnt on the eve of Holi as its symbolic representation.




Here @Headerlabs, we celebrate this festival on last Friday with lots of fun and masti. It was my first Holi here @HeaderLabs, and it was a very nice experience. I like the way they celebrate any festival, spacially Holi. First, You can’t be on leave on the day when the celebration is scheduled. Further, You will be the target if it’s your first Holi with them. In fact, there is no difference between the targeted person and the rest. The only difference which I felt is ....you will be thrown first to that muddy place(prepared specially for this festival). That’s it. Once you got that look which Anil Kapoor gets in the movie Nayak...You are done !! Now it’s your turn to replicate your looks to the remaining people. It was too much fun at least for me.

Thursday, 2 March 2017

Appium – There is more than just Clicking and Typing




In my last blog, we discussed how can we perform the actions on the app like clicking or filling the fields, like Login & Password. It was pretty interesting, right? Okay, But there are way more actions that can be performed with an app than what we did last time. In this blog, we are going to see how can we perform other actions such as Dragging, Scrolling over an app using appium.

Let’s start with Dragging, i.e handling the SeekBar. There are some scenarios, where we need to tackle the SeekBar, like to adjust the Volume, Brightness etc. To use this functionality we need to use the method provided by the appium driver called “LongPress()”. Well, that’s not enough. As we are aware of the functionality of the “long press”. It means just pressing the left click button of the mouse(on some object) and not releasing it for while. But that doesn’t drag the SeekBar to a particular position at all. To accomplish that, we definitely need to add some extra stuff. Like, providing the details(i.e., start and end points) to the driver in order to perform the drag operation.

In this example, we are going to see how to modify the range of distance in Tinder App. Say it’s 2 KM at present and I want to modify it to somewhere around 45-50 Km.

Well, to accomplish that, First we need to locate that location at the seek bar and clicking that seek bar. Which can be done by the below code, make sure you are using the correct ID of the element.


WebElement seekbar_distance = driver.findElementById("com.tinder:id/seekBar_distance");
seekbar_distance.click();


Now, we need to drag that pointer(over the seek bar). To do that, we need to make some arrangements. Like, setting the start, end and the distance that has to be cover by that pointer.
Once the pointer reached the desired position, it has to release the click and hence the longPress() is used in the association of two extra methods, “release().perform()”. There will be one more method, i.e., moveTo(int, int), It will actually move/drag that pointer on the seek bar to get the things done.

You can find the below code for the reference. I am sure it will work(on Android).


//Get width of the seekbar
int start = seekbar_distance.getLocation().getX();
int end = seekbar_distance.getSize().getWidth();
//Get height of the seekbar
int y = seekbar_distance.getLocation().getY();

//Select till which position you want to move the seekbar
TouchAction action = new TouchAction(driver);


int moveTo = (int)(end * 0.8); // 0.8 signifies that the 80% percent of the total length
action.longPress(start,y).moveTo(moveTo,y).release().perform();
System.out.println("Successfully moved !!!");



In case, you get any issue wit the code or anything else, shoot your queries or
doubts below in the comment section.

Have a Good Day !!