Automation Using Playwright-Part 1
Prerequisites: Visual Studio Code: Ensure you have Visual Studio Code installed on your machine. You can download it from the official website: https://code.visualstudio.com/download Node.js: Ensure you have Node.js installed on your machine. You can download it from Node.js official website. https://nodejs.org/en/download To check if the node installation is completed: Playwright project setup: Here you go, playwright has been successfully installed for your project. Opening the project in VSCode: In a default Playwright project, the folder structure is typically simple and flexible, allowing you to organize your automation scripts, configuration files, and other resources according to your needs. Let’s break down each component of this folder structure: It will contain an example.spec.ts file to refer to how a test file normally looks like Run the example test file: npx playwright show-report Your report will be generated and will open automatically in a browser and will something like shown in the above image. You can expand each of the tests and view the execution in detail. Config file walkthrough: This playwright.config.ts file is a central place to specify test-related settings, such as test directories, test reporters, test execution modes, and more. We’ll have a look at it in detail: Imports: The configuration file imports necessary modules from Playwright Test to define the configuration. Environment Variables (Optional): It includes the option to read environment variables from a file (using dotenv) if you need to set environment-specific configuration. Configuration Object: defineConfig() is used to define the Playwright Test configuration object. testDir: Specifies the directory where your test files are located. In this example, it’s set to ‘./tests’. Parallel Execution: fullyParallel allows running tests in parallel for improved performance. CI-Specific Configuration: forbidOnly and retries are configured based on whether the tests are running on a Continuous Integration (CI) environment. It forbids the use of ‘test.only’ and retries failed tests on CI. Number of Workers: The workers setting defines the number of workers for parallel execution, using one worker locally and potentially more on CI. Test Reporter: Specifies the test reporter format, in this case, ‘html’. Shared Settings: The use object contains shared settings for all test projects. For example, you can set a base URL for your tests. Test Projects: The projects array defines different test projects for different browsers (Chromium, Firefox, WebKit, etc.). Each project can have its specific configuration, such as browser settings. Local Development Server (Optional): The webServer section allows you to run a local development server before starting tests. This is useful for testing against a locally hosted web application. Feel free to customize and adapt this configuration file to your specific testing needs. You can uncomment and modify sections as necessary, depending on your project’s requirements and testing environment. You can start using Playwright with Typescript in this manner. I hope this makes it easier for you to set up and begin using Playwright without any worries. Thank you, Aditya for your valuable inputs for the blog.
Supercharge Your Sales: How D365 Sales and MS Teams Powers Up Lead Generation and Enables Advance System Usage [Contd] Part 2
In this blog, we’ll explore how D365 Sales and some of its easy-to-use features can revolutionize your lead generation process and elevate your overall system usage. We’ll delve into key D365 Sales features like Work Lists, Sequences, and Forecasts, uncovering their potential to streamline your sales pipeline, enhance collaboration among your teams, and provide valuable insights for informed decision-making. By the end of this journey, you’ll be equipped with the knowledge to not only boost your sales but also transform your entire sales ecosystem into a well-oiled machine. When you create a sequence, you define a set of activities that you want to perform on records, and the order to perform them in. This lets you concentrate on selling and gives you a better understanding of what to do next. By using a forecast: Conclusion: In the world of modern sales, success hinges on your ability to adapt, collaborate, and make data-driven decisions. Microsoft Dynamics 365 Sales works as a formidable tool to help you achieve these goals. From Work Lists that keep your sales reps focused and organized to Sequences that automate outreach, and Forecasts that provide a clear view of your future sales trajectory, D365 Sales equips you with the resources needed to drive revenue growth. Thank you, Sayantan for your valuable inputs!
Supercharge Your Sales: How D365 Sales and MS Teams Powers Up Lead Generation and Enables Advance System Usage
In today’s competitive business landscape, a successful sales strategy requires a combination of innovation, efficiency, and customer-centricity. D365 Sales delivers on all fronts, providing sales teams with the tools they need to generate, nurture, and close leads effectively. From predictive lead scoring to intelligent email campaigns and real-time collaboration, this powerful solution empowers salespeople to reach new heights of success. Embrace D365 Sales Accelerator and watch as your sales efforts transform into a revenue-generating machine, propelling your business toward new horizons. In today’s article, we will try to address few common challenges faced by sales teams and their solutions using D365 product features in an efficient and productive way. Thank you, Sayantan for sharing your valuable insights!
Unwinding Material Pricing Methods in Project Operations
Overview: This blog is regarding a new feature named “Material Pricing Methods” in D365 Project Operations and how you can get familiar with the topic. Solution: Steps to import a file in Project How to setup a material pricing on price list item: Price per unit – The price of the material is set to the amount that is specified in the Currency amount field. At cost – The transaction cost of the material is set as the sales price of the material. Markup percentage: The sales price of the material is calculated as a markup percentage over the transaction cost of the material. Example: Lets assume that we have Product “A“ with a transaction cost of Rs. 1000 and currency amount is set to Rs. 1500 , the unbilled sales actuals per unit will be calculated as follows: Product Project Pricing method Markup percentage Sales Price A at Cost At Cost 1000 A at markup % Markup Percentage 10 1100 A at price per unit Price Per unit 1500 Conclusion: It gives flexibility for the customer and even to the user to select the pricing method which is more suitable for their business. Thanks, Sankalp for your valuable inputs
Power Platform: CI/CD Pipeline
CI/CD pipeline containing Azure DevOps is well known and is necessary for the automated deployment of solutions from the development environment to the user acceptance test and from the user acceptance test to the production environment. Solution: – In Dynamics 365-2022-release wave 2, Microsoft introduced a feature called Power Platform Pipeline for deployment of Solution from Dev to UAT and UAT to Prod. To deploy the feature, no additional integration would be needed. To use the feature, your tenant only has to be configured. Prerequisites: – Steps to configure the environment: – NOTE: – The development environment and target environment must have Type and Region same and environment as a managed environment. 2. Give the name to your environment select region and type same as the “Host Environment” 3. Enter the URL to your Environment and give the access to D365 apps and select whatever you want to choose, and then click on “Save” button. 4. Repeat the steps for Target environment as well. 2. Give the name to your environment select region and type same as the “Host Environment” 3. Enter the URL to your Environment and give the access to D365 apps and select whatever you want to choose, and then click on “Save” button. 4. Repeat the steps for Target environment as well. Steps to setup “Host Environment Configure Pipeline: – Note: – if you have one more environment like production then add one stage in that fill the pervious deployment stage “UAT environment” so it will do UAT to Prod movement of a solution. Deployment of your Solution. Conclusion: – You can quickly and easily deploy your solution into a development-to-UAT environment. We won’t need to manually perform it or need Azure Integration with CI/CD. The solution migration will be a little bit simpler thanks to this automation method. Thank you, Vijay Kumar for your inputs
Compressing Image Attached in Notes
Problem Statement: Sometimes user has to upload or attach image inside Notes Section of form. When user uploads any image in Notes, dynamics stores image in Base 64 format. As frequency of uploading/attaching images increase then it will also increase the size requirement in CDS. To reduce the size requirement in CDS, we can compress image while storing it in CDS. Solution: When user attaches Image in Note(annotation), we can trigger Post Operation Async Plugin to Compress Image. When image gets attached to Notes, it gets stored as Base 64 inside “documentbody” field. So, we have to trigger Plugin on ‘Create of Notes’, get Base 64 code of Image, Compress Image and Update New Base 64 Code in Notes. Following Plugin code Converts Base 64 Code to Image format compresses Image without loosing quality and then reconvert it to Base 64 code: Plugin Code: (JPEG) Dynamics store Image attached in Note(annotations) in Base 64 form. Image Body will be stored in “documentbody” field and Image Type will be stored in “mimetype” field. Get Image Body and Image Type using following code: Now, create following method, which will compress Base 64 image. We have to pass Base 64 code and quality to custom method which will be used to compress image. Using this method, we can compress image till 10% – 90%. So, pass Image Quality between 10-90. Add Encoder method in class as it is used in “Base64StringImage” method. Once Base 64 Image Code gets compressed, our method will provide new Base 64 Image Code. Store it in new variable. Now, Update Document Body of Note(annotations) with new Document Body. Plugin Step: After Registering our code as New Plugin Assembly, add Step on Create on annotation (Notes). Make Execution Mode as Asynchronous as there will be chances where multiple users will upload Images as same time. Example: Image with Size: 1465 KB Uploaded Image in Notes: Image After Compression: Conclusion: Using above the plugin on Annotation Entity we can effectively compress image size by 10% to 90%. This will help us to save CDS size. Thanks Mayur Hande for your inputs on this blogs.