Thursday, 21 June 2012

Create an effective mobile site


Create an effective mobile site

Just because you can see your desktop website on a mobile phone doesn't mean that it's mobile-friendly. People who use high-end mobile devices, like iPhones or Android phones, can see standard AdWords ads and standard websites. But other possible customers use WAP mobile phones, which can only view specially designed mobile websites.
To reach the most mobile customers, it helps to create a mobile website that's tailored to the small screen and makes it easy for people to make a purchase or take other action on your site.
When designing your site, keep in mind mobile best practices, like simple navigation and highlighting local options of your business. If you'd like to reach customers with WAP phones, you'll also need to use mobile-friendly code to create your site.

Reaching mobile customers using a normal (HTML) website

Regardless of whether you have a mobile website, AdWords will let you show text ads to customers using Google Search on a high-end mobile device, like an iPhone or Android phone. These "smart phones" have a full Internet browser (like a desktop computer), so a customer who clicks your standard-sized text ad from the search results page can visit your standard website written with HTML.
By default, AdWords opts your new campaigns into "all available devices," which includes these "mobile devices with full browsers." You can opt in or out of showing ads on "Mobile devices with full browsers" from each campaign's Settings tab.

Keep in mind...

If you opt in, make sure that your landing page doesn't contain Flash content. Flash is currently not supported on iPhones or iPads, and has only limited support on Android and other high-end mobile devices. If our system detects that your landing page has lots of Flash content, we'll automatically limit your ads from running on high-end mobile devices.

Create a longer text ad

About longer text ads for Eastern Europe and Asia
Nowadays, many mobile devices have standard browsers, but some feature phones lack a full browser and can only view mobile-specific webpages. To reach customers on these devices, you'll need to create a WAP [mobile ad] and a WAP-friendly mobile website, which we'll talk about more below.

Best practices for designing a mobile site

When creating a mobile website, you'll want to keep in mind a few strategies that best take advantage of the small size of mobile screens and the behavior of mobile users. These strategies can help make sure your mobile site is a great experience for customers and direct them to take the desired actions on your site.
Keep it quick
  1. Reduce large blocks of text and use bullet points.
  2. Compress images to keep them small for faster site loading.
Make it easy to buy something or contact you.
  1. Reduce the number of steps needed to complete a transaction.
  2. Keep forms short, with the fewest number of fields possible.
  3. Use check boxes, lists, and scroll menus to make data entry easier.
  4. Use click-to-call functionality for all phone numbers.
Simplify navigation
  1. Minimize scrolling and keep it vertical only.
  2. Use a clear hierarchy in menus and avoid rollovers.
  3. Help customers navigate between levels with clear back and home buttons.
  4. Use seven links or fewer per page of navigation.
Help people find and get to your local sites
  1. Have your address or store locator on the landing page.
  2. Include maps and directions. Use GPS to personalise when possible.
  3. Allow customers to check stock at nearby stores.

Designing sites for WAP mobile phones

While desktop websites typically are written with HTML, a landing page for a WAP device will need to be written in a different coding language. WAP-friendly mobile websites can be written in a few different markup languages, including XHTML, CHTML, and WML. Each language is compatible with different mobile devices.
By considering which devices you'd most like your ad to appear on, you can best plan which language or languages you should use to create your mobile website.
Detailed instructions for creating a website in mobile-friendly code are available in theWebmaster Help Center.

Tip

Don't have coding skills? Visit our mobile resources site to find a developer who can help you create a mobile version of your website.
Once your mobile website is ready, make sure to set up a WAP mobile ad so you can reach the right customers.
If you already have a mobile-friendly website, but you're not sure what the markup language is, or want to confirm, here's how to find out.

Tip

Once you're all set with your mobile website, make sure that the WAP mobile ads you create are set to display in the correct markup language(s) in which your mobile site is written. You'll see this step while you're creating or editing a WAP ad, under "Specify the markup language in which your mobile website is written".

Improve your website


When you design and improve your website, thinking like your customer will likely help you to come up with and implement meaningful changes. You can follow our guidelines to help you design websites that are effectively indexed for Google Search. In addition, you can use Google tools to help you monitor and test your site.

Elements of a great website

What makes a website great depends on who you're trying to attract. For example, if you're looking to attract students to your website to play a game, you'll want to design your website differently than if you're trying to sell auto parts to professional mechanics.
Here are a few tips you might consider:
  • Think like your customers
    When you plan, design, or evaluate your website, pretend that you're one of your own customers, trying to accomplish a task. Think about what brought the customer there, whether the customer might have questions or a specific goal, and what familiarity the customer has with your products. This can be a difficult task because your knowledge of your products and website will likely be much deeper than your customer's knowledge – consider asking a coworker, friend, or family member who is less experienced with your business and website to navigate it for you.
  • Include only what you need
    For a new customer, unfamiliar websites can be very confusing. Just as you have to make difficult decisions about which products to stock on your shelves or include in your catalog, you'll need to exclude some information from your website to keep it clean and tidy. If you provide too many links, too many images, or too much text, you might confuse a potential customer. Ultimately, a well-organized and clear website can help you increase your return on investment and can improve your landing page experience.
  • Keep your pages loading quickly
    If your customers can't load your page, they can't buy your products! Make sure that your pages will load quickly for all your customers, especially if a segment of your customers uses slower Internet connections (such as dial-up Internet). In general, try to avoid lots of images, large images, and complex website widgets.
  • Keep your content current
    You don't have to spend a lot of time updating your website, but make sure you don't have outdated information, such as announcements for sales that have finished or incorrect pricing. Such details erode your customers' confidence in your website and in your company.
  • Include contact information
    Many customers, especially of stores with physical locations, will go to websites to get contact information. You might want to include this information at the bottom of every page. At the least, you should include a prominent link to your contact information on each page.
  • Make it mobile
    Many of your customers will connect to your website via mobile phones. Many of these phones will not be able to play Flash or handle complex, interactive graphics. Rather than losing these potential customers, provide a way for them to at least get critical information, if not browse your entire website. In fact, if your website has a lot of Flash content, your ads might not be eligible to show on mobile phones.
Hopefully these tips will provide a start in your efforts to design and revise your website. The Internet is a rich resource for more detailed advice in any of these categories.

Improve your search ranking

Search Engine Optimization (SEO) – in other words, making your website show up prominently in organic, unpaid search results – can be a complex task. However, many of the things that will make your website attractive to search engines, such as a clear page title and descriptive link text, are also elements that your customers will likely value.
To help you get your page listed in Google's search results, read more in the Webmaster Help Center:

Monitor and test your website

No matter how well you design your website, you'll likely still have elements you can improve. To identify those areas, you might consider using Google Analytics. Google Analytics tracks your website's visitors and tells you how many times your website's pages were viewed, how long people spent on your pages, where your visitors went after viewing a particular page, and more.
Once you've identified where you can improve your website, you'll want to design and publish new pages for it. If you're considering several different designs for a particular page (or even for your entire website), you can use Google Website Optimizer to testwhich page design best encourages your customers to convert through your website.

Tuesday, 19 June 2012

How to pass parameters in selenium RC using TestNG

We can parametrize our test cases using TestNG in Selenium RC.


import org.openqa.selenium.server.RemoteControlConfiguration;
import com.thoughtworks.selenium.*;
import org.openqa.selenium.server.*;
import org.testng.annotations.*;

import java.io.*;
import java.sql.*;



public class TestExcel extends SeleneseTestBase {

@DataProvider(name="DP1")
public Object[][] createData(){
Object[][] retObjArr = {{"testuser1","password1"},
{"testuser2","password2"},
{"testuser3","password3"},
{"testuser4","password4"},
{"testuser5","password5"},
};
return(retObjArr);
}


private SeleniumServer seleniumServer;
Selenium selenium;

@BeforeClass
public void setUp()throws Exception{

RemoteControlConfiguration rc = new RemoteControlConfiguration();
rc.trustAllSSLCertificates();
seleniumServer = new SeleniumServer(rc);
selenium = new DefaultSelenium("localhost",4444,"*iexplore","http://www.yahoo.com");
seleniumServer.start();
selenium.start();
}

@Test (dataProvider = "DP1")
public void testEmployeeData(String username, String password){
selenium.open("https://login.yahoo.com/config/mail?.src=ym&.intl=us/");
selenium.type("username", username);
selenium.type("passwd",password);
selenium.click(".save");
selenium.waitForPageToLoad("30000");
assertTrue(selenium.isTextPresent("Hi,"+username));
selenium.click("_test_sign_out");
selenium.waitForPageToLoad("30000");

}
@AfterTest
public void tearDown() throws InterruptedException{
selenium.stop();
seleniumServer.stop();

}