Selenium software testing Page Object Model - selenium

I just want to know about the page object model thing. In an e commerce website if we have 100’s of products and each product has its own detail page.. Then do we need to have a separate page for each product to perform some action. Lets say I have a mobile page which have 15 products and whenever I click on specific product it will land on its details page. So do we need to create 15 separate class files, one for each page or do we have any other alternative for this.

You need ask yourself this question
Is this 15 different product details page has same structure or different, I am not asking about page data (obviously it is different)?
if it's same, you just need one Product Details Page. If not you need to use inheritance to check how you can club related sub page in separate pages and create maintainable page object.

Presumably you only need one ProductDetailsPage class as the details and layout on the page will be generic ?

Related

Product and Review Schema data

I am trying to understand Schema data. My website has a Products page and a Reviews page. Do you know if I can implement enable the rich snippets for Reviews on a different page than the products? Can I 'hide' the reviews on the product pages? I am just trying to figure out the best way to implement.
If I have to redesign the markup for the products page to include the reviews, then that is what I will do
Yes, the documentation does ask for the reviews to be nested inside the item being reviewed.
"Make sure the review or ratings markup refers clearly to a specific product or service as shown in the examples above. Do this by nesting the review or ratings within the markup of another schema.org type — such as schema.org/Book or schema.org/LocalBusiness — or by using that schema.org typed element as a value for the itemReviewed property.
https://developers.google.com/structured-data/rich-snippets/reviews?hl=en&rd=1

Multipage Bootstrap and Google Analytics

I have sort of a problem how to use Google Analytics properly with Boostrap.
My page has 3 level deep subpages and the last subpage has it's own subdomain. In GA I see I can use max. 50 tracking codes within one service. What if I need more than that?
You are limited to 50 properties not 50 pages. Each property can track many pages and (up to 10 million hits a month for the free version) and events.
Typically you would use the same property code on all pages on the same site so you can see all that data together (though with option to drill down).
You would only use a new property code for a new site (though your subdomain might qualify for that if you want to track it separately).
So the two questions you want to ask yourself are:
Do you want to be able to report on two pages together? E.g. To see that your site gets 10,000 hits and 20% are for this page and 5% are for that page. Or people start at this page and then go to that page and then on to this page. If so it should be the same analytics property.
Do different people need to see these page stats? And is it a problem if they do? If so put as a separate property so you can permission separately.
It sounds like these are part of the same site so I'd be veering towards tracking them together on same property.
On a different note you should set one page as the main version (with a rel canonical tag) and redirect other version to that page to avoid confusing search engines thinking you have duplicated content. Do you have a reason for having the same content on two different addresses? It can cause SEO and other problems.

Select a dynamic link in qtp

I am doing record and play in qtp and my scenario is that I have to search for any product in a E-commerce site and then out of the list of that product i have to view details of the very first product.
Try descriptive programming. You can effectively use html id property to meet your requirement.
For example : If html id varies like "ctl00_ContentPlaceHolderMain_01_lbl", "ctl00_ContentPlaceHolderMain_02_lbl".
Then you can use Browser("name:=.).Page("title:=.").Link("html id:=ctl00_ContentPlaceHolderMain_"&".*_lbl").click
You can modify as per your application.

Brand filtering on category pages

In Bigcommerce, is it possible to add brand filtering to category pages?
The current options appear to be that you can select from "all brands" by visiting the brands page, or you could use the search engine to narrow your results but you're forced to type a keyword or space. I want to offer a way to narrow the products by brand for the specific category the user is viewing.
I've spoken to tech support and they've informed me that this is NOT an option through the control panel and would have to be done through the API.
In my attempt to do this with the API however, it doesn't appear there is anyway to dynamically identify which category a user viewing. Outside of hard-coding a template for each individual category, how can this be accomplished?
I was informed by API support that this is NOT possible. Their recommendation was to submit the idea to the support team for future implementation, and that I might be able to accomplish it through a combination of javascript and screen scraping.

How do you split one schema.org item across several pages?

I have a single page describing an organisation marked up with schema.org data, there are then multiple related pages with review data on.
At the moment these review pages have the same Organisation tag as the main page but this doesn't feel right to me, it seems like there should be one Organisation record for each company.
Does anyone have an experience or guidance on this matter or the best way of marking up review data on related pages?
-- I have thought about using the organisation url parameter on the review pages which points back to the main page but I am concerned this would eventually impact the listing of these review pages.
Updated with examples
This is an example of the main organisation page http://www.insidebuzz.co.uk/law/hogan-lovells
And this is one of the sub pages http://www.insidebuzz.co.uk/reviews/hogan-lovells/question/overall-satisfaction
[update 5/17/2013]
I've now found that the way we can link items from one to another is with itemid=". This link is to the WebSchemas/ExternalEnumerations page "Country" example. This example shows how this is done. Pay keen attention to the "itemid" usage.
NOT THE ANSWER:
Per HTML - Living Standard -- We can use the HTML5 Microdata "itemref" to accomplish your goal.
[example removed for brevity]
I've done this in MVC by placing the itemscope itemtype="... in the MVC equivalent of a Master Page and in the View's (child pages) used itemprop and itemref etc.
NOT THE ANSWER:
http://schema.org/CollectionPage
isPartOf = Indicates the collection or gallery to which the item belongs.
Hope this helps.