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.
Related
Can products in the react-admin framework be assigned to multiple categories?
For example in the demo, a new poster of a bearded man with a pet cat would ideally be categorised as both 'beard' and 'animal'. Currently you can only select one category.
You are able to specify multiple segments for a customer in the demo (using alt-select in the customer's segment drop-down list) so I wondered why this feature was not enabled for product categories...
In addition, can filtering then be configured to support multiple category filtering, rather than only allowing one single category term to be used?
Yes we could have implemented it this way for product categories too. We didn't as we wanted to show multiple types of references in the demo.
As for your question about filtering, yes, it's possible if you use the same input as for segments selection which allow multiple ones.
React-admin is a framework for building administration applications with React. It's not an e-commerce framework nor a UI kit. You can do whatever you want :)
I have a question about getting test data for automated testing, here is my problem:
I need to prepare automated testing scripts for a clothes shop.
And I need to know what is the best practice for getting test data needed for the following scenario:
Scenario description: Checking if a user can correctly add a product to the basket.
Given I am on the "WOMEN'S DRESSES" page
When I add "XXX" product to the bag
Then I can see "XXX" product displayed in the basket
My question is: how to ensure that the "XXX" product is always available and what is the best practice for this?
Do I have to always connect to the env database and check if the "XXX" product is available and if not then insert it into DB?
Or maybe should modify a little BDD scenario and get the list of currently available products on the "WOMEN'S DRESSES" page, chose any product, add it to the bag and check if it is correctly added to the basket? ( but in that case what to do if there are no products available for the testing env ?)
I want to have efficient and strong automated tests.
There are a few options for this. Some developers and I looked into a similar problem we had for a car-marketplace. We actually found out that the "dirty" way was the best way for us.
We simply did a BeforeFeature database query and picked up all brands which were available in the test environment. We added these brands to FeatureContext and ScenarioContext, depending on the required context. Because of the Feature/Scenario context, you can use these values during the run of that particular feature/scenario. During the "When" step, in the code, we created a list of all the brands available in the database.
Then, we passed every brand through specflow to the code and checked the list if it contained the brand. If the list did contain the brand, a click had to take place on that brand and we checked in the last step if we were landed on the page of that brand.
You could do something similar with the dresses.
So our specflow looked somewhat like:
Scenario Outline: Check available brands till vehicle detail page
Given I navigate to Vehichle Search Page
When I search '<Brand>', if available in test environment
Then I am navigated to the vehicle detail page
Examples:
|Brand|
|Audi |
|BMW |
|etc |
Just an addition:
This way of writing test keeps your test very BDD. Business can read what your are testing. Also, as long as the data model remains as-is, your tests are very maintainable. You can add unlimited amounts of dresses to your table and you will only get test results if the brands are available. So if the database is swiped clean, sure, not a single test will be executed, but you won't get any false positives or unnecessary negatives.
Also, you can choose to add brands to the database if they weren't found in the first place. You could do this within the "When" step. If the dress is not found in the list, you can add it with a query in the database at that moment.
In your case you have to add one more precondition:
GIVEN: XXX product is available on the "WOMEN'S DRESSES" page.
If product is not available - it's another test case )
Create XXX product just before test using most suitable way:
api call
web UI
DB update (not recommended)
or just mock api response for XXX product
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 ?
I have implemented Schema.org (using Microdata) inside my product pages and when I check Google Webmaster Tools it is crawled by Googlebot and interpreted successfully. The point is I have not implemented some properties inside Product type like brand.
I need to know whether there is some subset of all product attributes should be implemented essentially?
And the second question is how much it takes for Google to show product rating and price as rich snippet inside search results?
There are no mandatory properties/types in Schema.org.
However, consumers of the data, like Google Search, might have rules under which conditions they will make something with your data (e.g., they are looking for specific properties). So you’d have to check their documentation.
For Google Search, their Rich Snippets are documented at https://developers.google.com/structured-data/rich-snippets/. The Products Rich Snippets lists the required and optional properties/types. As you can see, the brand property is not required by Google for showing their Rich Snippet in the search results.
Hussein
As google has pointed out the structured data required for a snippet are :
Product
Name
Description
Pricespecifications (to include:)
Pricecurrency
Pricevalue
Availability
Validfrom
Image
First you should consider checking if the validfrom and availability attributes are added because both of them are the most common mistakes when you write your first SEO codes.
Then there are some attributes that while they are not in required list by Google's developers there seem to be the once that all successful snippets have (you might have noticed that too ) , the : review and vote attributes including the expect values from schema.org libraries. In some people's opinion ,mine also, having those will "almost" make sure they will get noticed.
Those are not pretty easy to get because u will have to create a way for getting reviews and votes.
Otherwise try using the webmaster new tool search console to highlight data for product snippet. Just make sure that the required attributes have their expected values in the text so you can mark all the above attributes with the tool.
Make sure all the attributes are markup and not meta data as it shows you are just making information up.
About the time , check that the structured data have increase for the peoduct and if not then fetch and submit to index.
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.