<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Khyati Sehgal on Medium]]></title>
        <description><![CDATA[Stories by Khyati Sehgal on Medium]]></description>
        <link>https://medium.com/@khyati2010?source=rss-a4386cb897f8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*ZVyEkZ0MQ6u8SGaT</url>
            <title>Stories by Khyati Sehgal on Medium</title>
            <link>https://medium.com/@khyati2010?source=rss-a4386cb897f8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 17:44:30 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@khyati2010/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Revamping automation framework with Product Mindset logic’s.]]></title>
            <link>https://medium.com/@khyati2010/revamping-automation-framework-with-product-mindset-logics-3dbd27763e92?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dbd27763e92</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[protractor]]></category>
            <category><![CDATA[cucumber]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Thu, 30 Apr 2020 19:46:32 GMT</pubDate>
            <atom:updated>2020-06-19T08:12:55.282Z</atom:updated>
            <content:encoded><![CDATA[<h3>Revamping automation framework with Product Mindset logic.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*XWvlfPXnZz0jKNqB" /></figure><p>Often we really don’t care to look at the material which we don’t understand or which is not eye-catchy. In this space, I will try to share a real-time example of how we as a team understood and deliver a problem that our Product owners and stakeholders were facing at the client-side. And thus helped us as a team in better collaboration over the certain things which we were doing in chunks.<br>Alright to start with..how about this, can you read this? Very few people can connect to this…right?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*cRVEMZ8oKrzy8m1XjkNkRg.png" /><figcaption>method to enter value in a textbox</figcaption></figure><p>And now this? More people can understand.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OMxfwAD7akgnjwbj5tc9-g.png" /></figure><p>Looks interesting and more connected?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*CRZujGHA8UuB0BjIhhr85A.png" /></figure><p>Yep!! Reason:- We used the common language here which almost all of us understands i.e. Native English<br>The same concept is applicable to the software when we don’t understand the code which makes us uncomfortable and is time-consuming to understand for that matter, we try to make our OWN rather digging into much of it by applying the best practices we know or another way is pair-programming with the one who has written it from the root.<br>In one of my projects, we observed that our Business Analysts and Product owners team had a hard time understanding the code we have written as it&#39;s not their forte to do such work as DIY.</p><p>As a team, we tried to implement an idea by understanding their perspective which will help them in understanding the code, by writing the code in a language they understand.</p><p><strong>Thanks to BDD.</strong></p><p>For achieving this we tried ‘<strong>cucumber</strong>‘, as they are familiar with the gherkin language in which they are writing the User stories/Product backlog item we decided to incorporate the same in the code as well.</p><h3>Extending the Testing Center of Excellence</h3><p><strong>Cucumber feature file</strong></p><pre>Feature: Covering all priority scenarios of  application<br>    Background: open application as admin user<br>        Given open application as admin user<br>        When go to admin panel</pre><p>How difficult is this file to read when delivered to a product owner or Business analyst?</p><p>The answer would be much easier to understand as it is simple English.</p><h3>Build to outcomes Action</h3><p>This was way easier to deliver feature files in sync with the Product Backlog Item’s Acceptance criteria. And we put our legs in their shoes to ease up the things.</p><p>As a result, we started getting a lot of new scenarios and cases from them which we started implementing as a part of the extension of the automation framework.</p><h3>Lesson Learnt</h3><p>This way we were able to achieve a lot of pointers from the product mindset thinking:-</p><p><strong>Minimize time-to-value</strong>– Though there was a time wherein we put a stretch to make this change in the framework architecture but now definitely as a team we can firmly say that was Worth-it!</p><p><strong>Excel at change Action — </strong>By retrospecting, where we are lagging to make it happen, This was in our mind that the change is happening for a reason which is Customer Delight.</p><p><strong>Focus feature development on a specific measure of customer engagement</strong>– This we have achieved my taking baby-steps at initial, as the challenge was to make a smooth transition from a basic project to BDD. Wherein we chose to do it in MVP way, so as to take small chunks first and then enhance as we go with the flow.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dbd27763e92" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Implementing page object model using protractor and typescript]]></title>
            <link>https://medium.com/@khyati2010/implementing-page-object-model-using-protractor-and-typescript-7d61760309ad?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d61760309ad</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[cucumber]]></category>
            <category><![CDATA[protractor]]></category>
            <category><![CDATA[page-object-model]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Thu, 01 Aug 2019 18:54:49 GMT</pubDate>
            <atom:updated>2020-06-19T08:26:32.753Z</atom:updated>
            <content:encoded><![CDATA[<p>Before we dwell on some facts let us step back and understand why I am actually writing this blog. As we understand with this rapid growth not only the developers but we Automation Test Engineers are also constantly grooming ourselves by learning new stuff.</p><p>Be it a new programming language or a scripting language we have to widen our thoughts &amp; skills. So while thinking of creating a new automation framework now we are discussing things like handling promises, synchronization, infrastructures, continuous testing, continuous integration, version control, DevOps, VMs, and whatnot.</p><p>In one of the recent projects, I have created a framework in which we picked a new tech stack in contrast to the one which is widely used (Yes, I am talking about Java+ Eclipse + TestNg.)</p><p>Let&#39;s go deep dive and understand what all I have done for automating an application for which Frontend is written in <a href="https://aurelia.io/">Aurelia</a> and Backend in C#, .Net.</p><p>Here I have used typescript with Jasmine in <a href="https://khyatisehgal.wordpress.com/2019/05/27/getting-started-with-the-protractor/">protractor</a>.</p><p>You can implement BDD using cucumber as well with the same concept which Cucumber follows.</p><h3>What is Protractor?</h3><p><strong>Protractor</strong>, a wrapper on top of <strong>Selenium Webdriver</strong> has helped us a lot.</p><ul><li>It&#39;s an end-to-end testing framework for web applications and built on top of WebDriverJS.</li><li>Uses the Jasmine framework for its syntax as the default framework.</li><li>Node.js program.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/1*mMkUpT4gm-OFMZGviOpKiw.png" /></figure><h3>How to work with Page Objects?</h3><p>It works similarly to the real concept of Page object where you can create new classes for each page and place all the objects locators in class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/191/0*JYr7grLkB_BYbtgr.png" /></figure><h3>But How to work with pages? Example of the page class</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*tozOVI5uU1kErmfE.png" /></figure><h3>Ok, but how does my BasePage will look like?</h3><blockquote><em>export class BasePage {<br>textbox = new TextBox();<br>click = new Click();<br>scrollpage = new ScrollPage();</em></blockquote><blockquote><em>public openHomeLink() {<br>browser.get(userData.URL_HOME_PAGE);<br>}</em></blockquote><blockquote><em>/**<br>* Converts a date to a string using the specified formatting. <br>* <br>* @default <br>* format is ‘dd/mm/yyyy’<br>*/<br>static toDateString(date: Date, format: string=”dd/mm/yyyy”) {</em></blockquote><blockquote><em>// Integer value representing the year <br>const year = date.getFullYear();<br>// Integer value representing the month, beginning with 0 for January to 11 for December<br>const month = date.getMonth() + 1;<br>// Integer value representing the day of the month.<br>const day = date.getDate();</em></blockquote><blockquote><em>if(format == “mm/dd/yyyy”) {<br>return month + “/” + day + “/” + year;<br>}</em></blockquote><blockquote><em>else if(format == “yyyy/mm/dd”) {<br>return year + “/” + month + “/” + day;<br>} <br>return day + “/” + month + “/” + year;<br>}</em></blockquote><blockquote><em>/**<br>* Returns the random number.<br>*/<br>static generateRandomNumber() {<br>return Math.floor(Math.random() * 20) + 1;<br>}</em></blockquote><blockquote><em>/**<br>* Returns the random date between the specified start and end date<br>*/<br>static generateRandomDate(start: Date, end: Date) {<br>return new Date(start.getTime() + Math.random() * (end.getTime() — start.getTime()));<br>}<br>}</em></blockquote><p>Common functions will go in Base class so that when extended all the classes can use them easily.</p><h3>Example of page object class</h3><blockquote><em>import { element, by } from “protractor”;</em></blockquote><blockquote><em>export class PageObjectClass {<br>static headerAddVendor = element(by.css(“div.banner-title.white.p-sm”));<br>static inputVendorName = element(by.xpath(“//div[div[select[@id=’criticality’]]]/preceding-sibling::div//input[@ref=’inputElem’]”));<br>static selectCriticality = element(by.id(“criticality”));<br>static selectThirdFourthParty = element(by.xpath(“//select[@value.bind=’selectedThirdOrFourthVendorType’]”));<br>}</em></blockquote><p>Summing it up, it all depends on the way you want to form the project. And no bar to the language you are using.</p><p>It totally depends on the requirement of the project and the enthusiasm of the team. As together as a team we can achieve incredible results.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d61760309ad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross browser testing via Sauce labs?]]></title>
            <link>https://medium.com/@khyati2010/cross-browser-testing-via-sauce-labs-2c49e2487d80?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c49e2487d80</guid>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[cross-browser-testing]]></category>
            <category><![CDATA[sauce-labs]]></category>
            <category><![CDATA[cloud-testing]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Mon, 27 May 2019 12:07:40 GMT</pubDate>
            <atom:updated>2020-05-14T10:04:52.549Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this post I will be sharing how we can test our local code on cloud, though there are multiple ways to do it. Lets explore one of them.</blockquote><p>Learning starts when you start experimenting. Be it in Information Technology or layman’s life.</p><p>I will be using this space to make you understand a tool which will be of great help, not only for all the Software QA but to the Product Owners, Developer, stakeholders, etc. It has all the solution to the issues we foresee in day-to-day life. As we know in Agile we always define the Acceptance criteria, Definition of Done while make a story.</p><p>For those who are not so familiar with Agile , Kindly go through this wiki page- <a href="https://en.wikipedia.org/wiki/Agile_software_development">https://en.wikipedia.org/wiki/Agile_software_development </a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/367/0*V_9FrF0RD-rU9JTz" /></figure><p>So, in a web GUI testing or any mobile device specific testing, to mark a story complete , we need to make sure that the story is functionally tested around the whole bunch of permutation and combinations. This includes various operating systems, browsers, resolutions, devices, versions, etc. Sauce labs provide all this at one place and that too with very simple steps.</p><p>As an automation Engineer, you must have to understand the complexity which lies back to each and every combination so that we can call testing close to complete, as complete testing is a way vast term according to me.</p><p>If you have ever worked with Selenium then you must have heard of the terms like parallel execution, virtual machine, dealing with multiple browser/Operating system specifications, etc.</p><p>And of-course looking for a single fast solution is what we need when it comes to real time run. In this post I will be sharing a tool which compliments all this and has made for automation with tools like selenium.</p><p>On this note, I shall take no more time to introduce you with this fantastic tool called- Sauce Labs.</p><p>It is a cross browser, multiple utility tool which comes in two forms free-trial and paid version. This is how the dashboard looks like:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/675/0*2_vtOzPFEGiqa6G2" /></figure><p>Sauce labs comes with 2 flavors — the <em>free </em>version and the <em>paid </em>version.</p><p>You can avail the paid version for free to sign up for a month and then once you are familiar with this awesome tool, then you can check the price associated with it from sauce labs official site.</p><p>In upcoming blog post, I shall be sharing the details of the functions which sauce labs provides.</p><h3>Limitations</h3><ul><li>One have to type with virtual keyboard.</li><li>Frequent session timeouts.</li><li>Full list of devices versions not available.</li><li>Time consuming and tedious for proxy set up for private network and Urls.</li><li>Minimal support for ipad mini.</li><li>Less support for windows applications.</li><li>Other tools like browser stack, Selenium grid, docker, etc</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c49e2487d80" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting started with the protractor]]></title>
            <link>https://medium.com/@khyati2010/getting-started-with-the-protractor-69357c4537c9?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/69357c4537c9</guid>
            <category><![CDATA[protractor]]></category>
            <category><![CDATA[qa-automation]]></category>
            <category><![CDATA[protractor-framework]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Mon, 27 May 2019 08:40:17 GMT</pubDate>
            <atom:updated>2020-05-14T10:05:17.706Z</atom:updated>
            <content:encoded><![CDATA[<p>As an automation QA Engineer, I always try to work on areas where I can work with pace and efficiency, technology doesn’t matter. As the world is moving towards scripting language We as a QA also work together.</p><p>I am talking about the AngularJS, ReactJS applications which are highly acceptable and readily used in today’s world be it a Banking app or a CRM based. One can connect to all the application with Front-end as a JS app and back-end can be anything C# , Java ,etc. Here the role of QA is to identify the best fit he/she can apply to quickly automate all the cases in a highly compatible language which supports the Front-end application.</p><p>Here, I am talking about protractor. For one of my applications which is written in Aurelia (FE tool to create an application similar to AngularJS) we decided to work upon protractor, let’s talk about it in this blog how we managed to do it.</p><p>When it comes to testing applications, there are two main types of tests one wants to cover: Unit and end-to-end(e2e) . End to end usually refers to the QA testing and unit mainly for the developers to take ownership of.</p><p>I will be focusing on the e2e in this post at a glance.</p><h3>Protractor?</h3><ul><li>End-to-end testing framework for web applications and built on top of WebDriverJS.</li><li>Uses Jasmine framework for its syntax as default framework.<br> Node.js .</li></ul><p>Protractor , a wrapper on top of Selenium Webdriver can help us a lot.</p><h3>Why to use protractor?</h3><ul><li>Support for Angular based Apps</li><li>Automatic Waiting</li><li>Page Object Model Support</li><li>Support for Selenium Server without it</li><li>The concept of the Custom locator</li></ul><h3>Who uses protractor?</h3><p>The whole Scrum team.</p><h3>Setting up Protractor</h3><ul><li>nodeJs to run protractor commands.</li><li>JDK — protractor needs Selenium to control browser automatically, which needs Java<br> Protractor</li><li>webdriver Manager</li></ul><h3>But, how to execute?</h3><p>- `npm run e2e`</p><p>- run tests via plain Protractor `node_modules/.bin/protractor conf.js`</p><p>- run tests `npm test` (runs via flake, which re-runs failed tests)</p><h3>Adding dependency via package.json</h3><p>“name”: “e2e”,</p><p>“version”: “0.0.1”,</p><p>“scripts”: {</p><p>“test”: “protractor protractorConf.js –params.login.url=https://localhost:8080”,</p><p>“webdriver:update”: “webdriver-manager update”,</p><p>“webdriver:start”: “webdriver-manager start”,</p><p>“watch”: “npm-watch”</p><p>},</p><p>“devDependencies”: {</p><p>“@types/chai”: “⁴.1.7”,</p><p>“@types/chai-as-promised”: “⁷.1.0”,</p><p>“@types/jasminewd2”: “².0.6”,</p><p>“@types/node”: “⁸.0.10”,</p><p>“jasmine”: “³.4.0”,</p><p>“jasmine-allure-reporter”: “¹.0.2”,</p><p>“jasmine-core”: “2.5.2”,</p><p>“jasmine-data-provider”: “2.2.0”,</p><p>“jasmine-expect”: “³.8.4”,</p><p>“jasmine-spec-reporter”: “².5.0”,</p><p>“jasminewd2”: “².2.0”,</p><p>“protractor”: “⁵.4.1”,</p><p>“protractor-beautiful-reporter”: “¹.2.7”,</p><p>“protractor-testability-plugin”: “¹.2.0”,</p><p>“selenium-webdriver”: “3.0.1”,</p><p>“ts-node”: “².0.0”,</p><p>“typescript”: “².3.4”,</p><p>“webdriver-manager”: “¹².1.1”,</p><p>}</p><h3>Maintaining test data in json</h3><p>There are multiple ways to do it, we can create enums of data, create config files , multi-class support in one file and creating json is one of the approach of it.</p><p>“SiteUrls”: {</p><p>“sand1Url”: “<a href="https://sand-dev-1-rsd.venminder.com/">https://sand-box-1.com</a>&quot;,</p><p>“sandQa1Url”: “<a href="https://sand-qa-1-rsd.venminder.com/">https://sand-qa-1.com</a>&quot;,</p><p>“sand2Url”: “<a href="https://sand-dev-2-app.venminder.com/">https://sand-box-2.com</a>&quot;,</p><p>},</p><h3>Managing configuration for running specs/tests.</h3><p>specs: [“./e2e/com.poc.specs/User.ts”],</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69357c4537c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reporting in protractor based automation framework]]></title>
            <link>https://medium.com/@khyati2010/reporting-in-protractor-based-automation-framework-c1557ec9429a?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1557ec9429a</guid>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Mon, 27 May 2019 08:06:31 GMT</pubDate>
            <atom:updated>2020-06-29T05:37:37.853Z</atom:updated>
            <content:encoded><![CDATA[<p>Reporting is one of the major features which completes the framework. This is something that impacts the stakeholder and gives them the real picture as a whole without looking into the nitty-gritty.</p><h3>Options I explored:-</h3><ol><li>Allure reports</li><li><strong>HTML Spec reporter</strong>-protractor-beautiful-reporter</li><li><strong>Jasmine Spec Reporter-</strong> jasmine-spec-reporter</li></ol><p>In this post, I will discuss protractor-jasmine2-HTML-reporter</p><h3>How to configure protractor-jasmine2-HTML-reporter?</h3><p>You will find this as available via npm. It is a plugin to generate out of Jasmine tests.</p><blockquote><em>npm install protractor-jasmine2-html-reporter -save-dev</em></blockquote><p>One just needs to add it as a dev dependency into package.json.</p><p>By simple configurations just map this with the command:- npm test.</p><p>And as you run the code with npm test the reports will generate on the function added as I did it in onPrepare().</p><p>The execution of the code will start from protractorConf.js file so I have placed the same code in the configuration file just to make sure it should run together with the specs.</p><p>You can add multiple other parameters which can customize the report for you. Here is the one which I have used.</p><p>onPrepare: () =&gt; {</p><p>displayFailuresSummary: true,</p><p>displayFailuredSpec: true,</p><p>displaySuiteNumber: true,</p><p>displaySpecDuration: true,</p><p>}).getJasmine2Reporter());</p><p>Once the code will be executed the reports will look like this:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*AIp95WdPtcKLy6Es" /></figure><p>Failing Specs</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*34UDf1usmE-JYGQP" /></figure><p>The best part of these reports are you can check the browser console logs from the reports</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*yLDTCF_bXsKbbhhf" /></figure><p><strong>Passed Test Case</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*TOILYDydOk7d6rXr" /></figure><p>Above are the filter, so you can set if you want to see the Time, Screenshots, OS, etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/0*vBcJIFn6gnrff9W1" /></figure><p>Published by Khyati Sehgal</p><p>Khyati has more than 8 years of experience in quality assurance engineering. Khyati has worked extensively on Manual and Automation testing of various technologies and domains like data quality. From last 6 years, She is leading QA Activities on Agile/Scrum projects while continuously contributing in playing role as a Scrum master, continuous integration, iteration planning, facilitating requirement analysis and closure. On automation front, She has explored gui, web services and mobile automation. Tools/ Technologies used:- Selenium/WebDriver, Core Java, JUnit, TestNG, Maven, SoapUI. Jenkins, Appium, Selenium backed and selenium remote driver. Have delve into android phone/tab of verison upto 6 (marshmallow), ios phone/i pad, and mobile websites <a href="https://khyatisehgal.wordpress.com/author/khyatisehgal/">View all posts by Khyati Sehgal</a></p><p><em>Originally published at </em><a href="https://khyatisehgal.wordpress.com/2019/05/27/reporting-in-protractor-based-automation-framework/"><em>http://khyatisehgal.wordpress.com</em></a><em> on May 27, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1557ec9429a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting loggers in Selenium]]></title>
            <link>https://medium.com/@khyati2010/setting-loggers-in-selenium-832916d8a8db?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/832916d8a8db</guid>
            <category><![CDATA[selenium]]></category>
            <category><![CDATA[log4j]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[selenium-test-automation]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Mon, 11 Jun 2018 12:47:26 GMT</pubDate>
            <atom:updated>2020-06-29T05:37:31.104Z</atom:updated>
            <content:encoded><![CDATA[<pre>import java.io.File; <br>import java.io.IOException; <br>import org.apache.log4j.ConsoleAppender;<br>import org.apache.log4j.Level; <br>import org.apache.log4j.LogManager; <br>import org.apache.log4j.Logger; <br>import org.apache.log4j.PatternLayout; <br>import org.apache.log4j.RollingFileAppender;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*vac54F6VgGNwuKSiC6WrYA.png" /><figcaption>Log4j with Java-selenium</figcaption></figure><p><strong>Give the class a name that can be used throughout</strong></p><pre>public class Loggers <br>{ <br>public static Logger log = LogManager.getLogger(Loggers.class.getName());</pre><p><strong>Method to set the logger</strong></p><pre>public static void setLogger()<br> {<br> /* get the Verbose value from System environment variable to get the logLevel.<br> * if Verbose=1 then logLevel is set to DEBUG and else by default logLevel set to <br>* INFO Level for logs according to the priority (ALL &gt; TRACE &gt; DEBUG &gt; INFO &gt; WARN&gt; ERROR &gt; FATAL &gt; OFF ) */ <br>// log.getRootLogger().setLevel(Level.OFF); </pre><pre>try<br> {<br> final String value = System.getenv(&quot;evgm.log.Verbose&quot;); <br>if (value.equals(&quot;1&quot;)) log.setLevel(Level.DEBUG); <br>else log.setLevel(Level.INFO);<br> } <br>catch (Exception e)<br> {<br> log.setLevel(Level.INFO); <br>} <br>/*PatternLayout represents the pattern of logs that is generated. * %d:date, %t:Thread Name, %p:levels(info,warn,error e.t.c), m:mesages, n:new line <br>*/ PatternLayout layout = new PatternLayout(&quot;[%d{dd MMM yyyy HH:mm:ss}] [%t] [%p] %m%n&quot;); <br>log.addAppender(new ConsoleAppender(layout));<br> try <br>{ <br>File directory = null; <br>// To get current path of directory<br> final String cwd = System.getProperty(&quot;user.dir&quot;); <br>directory = new File(cwd + File.separator + &quot;Logs&quot;); <br>if (!directory.exists())<br> {<br> directory.mkdirs(); <br>} <br>else <br>{<br> for (File file : directory.listFiles())<br> { <br>if (file.isFile())<br> file.delete(); <br>}<br>} <br>// Define file appender with layout and output log file name <br>RollingFileAppender fileAppender = new RollingFileAppender(layout, directory + File.separator + &quot;Logs.log&quot;); <br>// Add the appender to logger to output logs in File log.addAppender(fileAppender); <br>} <br>catch (IOException e) <br>{ <br>log.error(&quot;Failed to add appender !!&quot;);<br>} <br>}</pre><p><strong>Method for info type of logger</strong></p><pre>/*info():<br>logs the information which is helpful in track the application <br>* flow @param msg:message is passed as parameter which is to be logged */ <br>public static void info(String msg) <br>{ <br>log.info(String.format(&quot;[%s]&quot;, Thread.currentThread().getId()) + &quot; &quot; + Thread.currentThread().getStackTrace()[2] + &quot; - &quot; + msg); <br>}</pre><p><strong>Method for warn type of logger</strong></p><pre>/*warn():Designates potentially harmful situations. <br>* @param msg:message is passed as parameter which is to be logged <br>*/ <br>public static void warn(String msg) <br>{ <br>log.warn(String.format(&quot;[%s]&quot;, Thread.currentThread().getId()) + &quot; &quot; + Thread.currentThread().getStackTrace()[2] + &quot; - &quot; + msg); <br>}</pre><p><strong>Method for error type of logger</strong></p><pre>/*error():Designates error events that might still allow the application to <br>*continue running. Any exceptions under catch is handled using error <br>* @param msg:message is passed which is to be logged */ <br>public static void error(String msg) <br>{ <br>log.error(String.format(&quot;[%s]&quot;, Thread.currentThread().getId()) + &quot; &quot; + Thread.currentThread().getStackTrace()[2] + &quot; - &quot; + msg); <br>}</pre><p><strong>Method for fatal type of logger</strong></p><pre>/* fatal():Designates very severe error events that will presumably lead the <br>*application to abort. <br>* @param msg:message is passed which is to be logged */ <br>public static void fatal(String msg) <br>{ <br>log.fatal(String.format(&quot;[%s]&quot;, Thread.currentThread().getId()) + &quot; &quot; + Thread.currentThread().getStackTrace()[2] + &quot; - &quot; + msg); <br>}</pre><p><strong>Method for trace type of logger</strong></p><pre>/* trace():Designates finer-grained informational events than the DEBUG. <br>* @param msg:message is passed which is to be logged <br>*/ <br>public static void trace(String msg) <br>{ <br>log.trace(String.format(&quot;[%s]&quot;, Thread.currentThread().getId()) + &quot; &quot; + Thread.currentThread().getStackTrace()[2] + &quot; - &quot; + msg); <br>}</pre><p><strong>Method for debug type of logger</strong></p><pre>/*debug():Designates fine-grained informational events that are most useful <br>*to debug an application. debug method takes time to evaluate, in that case you <br>*can skip this evaluation if debug is not enabled. <br>* @param msg:message is passed which is to be logged <br>*/ <br>public static void debug(String msg) <br>{ <br>if (log.isDebugEnabled()) <br>{<br> log.debug(String.format(&quot;[%s]&quot;, Thread.currentThread().getId()) + &quot; &quot; + Thread.currentThread().getStackTrace()[2] + &quot; - &quot; + msg); <br>} <br>}</pre><p>And you are ready to start!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/0*L0i7DJZuOvanOGyv" /></figure><p>Khyati has more than 8 years of experience in quality assurance engineering. Khyati has worked extensively on Manual and Automation testing of various technologies and domains like data quality. For the last 6 years, She is leading QA Activities on Agile/Scrum projects while continuously contributing to playing a role as a Scrum master, continuous integration, iteration planning, facilitating requirement analysis, and closure. On the automation front, She has explored GUI, web services, and mobile automation. Tools/ Technologies used:- Selenium/WebDriver, Core Java, JUnit, TestNG, Maven, SoapUI. Jenkins, Appium, Selenium backed, and selenium remote driver. Have delved into the android phone/tab of version up to 6 (marshmallow), ios phone/I pad, and mobile websites</p><p><a href="https://khyatisehgal.wordpress.com/author/khyatisehgal/">View all posts by Khyati Sehgal</a></p><p><em>Originally published at </em><a href="https://khyatisehgal.wordpress.com/2018/06/11/setting-loggers-in-selenium/"><em>http://khyatisehgal.wordpress.com</em></a><em> on June 11, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=832916d8a8db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dealing with multiple browsers in selenium]]></title>
            <link>https://medium.com/@khyati2010/dealing-with-multiple-browsers-in-selenium-ef2928b314c?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/ef2928b314c</guid>
            <category><![CDATA[selenium-test-automation]]></category>
            <category><![CDATA[cross-browser-testing]]></category>
            <category><![CDATA[selenium-webdriver]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[qa-automation]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Wed, 06 Jun 2018 20:57:03 GMT</pubDate>
            <atom:updated>2020-06-26T06:59:13.730Z</atom:updated>
            <content:encoded><![CDATA[<p>As technology grows we have to deal with multiple things. Things that are similar in behavior and functioning but still different. One of the cases comes up when we have to deal with multiple browsers in selenium.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/1*Pv08zVH3CLJ0pFRCCn4Gkw.jpeg" /></figure><p>Here is the code snippet which can help you to initiate a browser seamlessly when added in project utility.</p><p><strong>How to work with browsers other than the default(Firefox) browser?</strong></p><pre>public static WebDriver getDriver() throws InterruptedException, IOException <br>{<br> OS = System.getProperty(&quot;os.name&quot;).toLowerCase();<br>//Check for Operating system name<br> WebDriver driver = ThreadDriver.get();<br> String workingDir = System.getProperty(&quot;user.dir&quot;);<br> if (driver == null) //Check for default browser <br>{<br>if (browserType.equals(&quot;firefox&quot;))<br> {<br>if (isWindows())<br> { <br>//This will set the property in the OS/System you are working on <br>System.setProperty(&quot;webdriver.gecko.driver&quot;, workingDir + &quot;//driver//geckodriver.exe&quot;); <br>}<br>else if (isMac()) <br>{ <br>System.setProperty(&quot;webdriver.gecko.driver&quot;, workingDir + &quot;//driver//geckodriver.exe&quot;);<br> }<br>else if (isLinux()) <br>{<br> //Setting capabilities to handle functioning like JS handling, alerts, certificates, etc <br>System.setProperty(&quot;webdriver.gecko.driver&quot;, &quot;/usr/bin/geckodriver&quot;); <br>} <br>DesiredCapabilities capabilities = DesiredCapabilities.firefox(); capabilities.setCapability(&quot;marionette&quot;, true); <br>capabilities.setBrowserName(&quot;firefox&quot;); <br>capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); <br>driver = new EventFiringWebDriver(new FirefoxDriver()); </pre><pre>FirefoxProfile profile = new FirefoxProfile(); </pre><pre>profile.setAssumeUntrustedCertificateIssuer(false); <br>profile.setAcceptUntrustedCertificates(false); <br>profile.setPreference(&quot;dom.disable_beforeunload&quot;, true); <br>profile.setPreference(&quot;javascript.enabled&quot;, true); <br>ThreadDriver.set(driver); <br>getDriver().manage().timeouts().implicitlyWait(30000, TimeUnit.MILLISECONDS);<br>wait = new WebDriverWait(driver, 30);<br> } <br>//Repeat the same for other browsers if (browserType.equals(&quot;chrome&quot;)) <br>{<br>if (isWindows()) <br>{ <br>System.setProperty(&quot;webdriver.chrome.driver&quot;, workingDir + &quot;//driver//chromedriver.exe&quot;); <br>} <br>else if (isMac())<br> { <br>System.setProperty(&quot;webdriver.chrome.driver&quot;, workingDir + &quot;//driver//chromedriver&quot;);<br> } <br>else if (isLinux()) <br>{ <br>System.setProperty(&quot;webdriver.chrome.driver&quot;, &quot;/usr/bin/chromedriver&quot;);<br> } <br>capabilities = DesiredCapabilities.chrome(); <br>ChromeOptions options = new ChromeOptions(); <br>options.addArguments(&quot;test-type&quot;);<br>options.addArguments(&quot;--start-maximized&quot;); <br>options.addArguments(&quot;--disable-web-security&quot;); <br>options.addArguments(&quot;--allow-running-insecure-content&quot;); options.addArguments(&quot;--js-flags=--expose-gc&quot;); options.addArguments(&quot;--enable-precise-memory-info&quot;); options.addArguments(&quot;--disable-popup-blocking&quot;); options.addArguments(&quot;--disable-default-apps&quot;); options.addArguments(&quot;test-type=browser&quot;); options.addArguments(&quot;disable-infobars&quot;); <br>options.addArguments(&quot;--incognito&quot;); <br>options.addArguments(&quot;--use-fake-ui-for-media-stream&quot;); <br>capabilities.setCapability(&quot;chrome.binary&quot;, &quot;./src//lib//chromedriver&quot;); </pre><pre>//Setting multiple capabilities as per the requirements capabilities.setCapability(ChromeOptions.CAPABILITY, options); <br>driver = new ChromeDriver(options);<br>ThreadDriver.set(driver); <br>if (isMac())<br> {<br> maximizeScreen(); <br>} <br>getDriver().manage().timeouts().implicitlyWait(30000, TimeUnit.MILLISECONDS);<br> wait = new WebDriverWait(driver, 30);<br> } <br>if (browserType.equals(&quot;ie&quot;)) <br>{ <br>System.setProperty(&quot;webdriver.ie.driver&quot;, workingDir + &quot;//driver//IEDriverServer.exe&quot;); </pre><pre>driver = new EventFiringWebDriver(new InternetExplorerDriver()); ThreadDriver.set(driver); </pre><pre>getDriver().manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); <br>wait = new WebDriverWait(driver, 30);<br> } <br>if (browserType.equals(&quot;safari&quot;)) <br>{ <br>System.setProperty(&quot;webdriver.safari.driver&quot;, &quot;/driver/SafariDriver.safariextz&quot;); System.setProperty(&quot;webdriver.safari.noinstall&quot;, &quot;true&quot;); <br>DesiredCapabilities desiredCapabilities = DesiredCapabilities.safari(); </pre><pre>SafariOptions safariOptions = new SafariOptions(); safariOptions.setUseCleanSession(true); <br>safariOptions.getUseCleanSession(); <br>safariOptions.setUseCleanSession(true); <br>desiredCapabilities.setCapability(SafariOptions.CAPABILITY, safariOptions); </pre><pre>driver = new EventFiringWebDriver(new SafariDriver()); <br>ThreadDriver.set(driver); <br>getDriver().manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS); <br>wait = new WebDriverWait(driver, 30); <br>} <br>}<br> return driver; <br>}</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/0*uf7wQQwWQ-Qrwlzk" /></figure><p>Khyati has more than 8 years of experience in quality assurance engineering. Khyati has worked extensively on Manual and Automation testing of various technologies and domains like data quality. For the last 6 years, She is leading QA Activities on Agile/Scrum projects while continuously contributing to playing a role as a Scrum master, continuous integration, iteration planning, facilitating requirement analysis, and closure. On the automation front, She has explored GUI, web services, and mobile automation. Tools/ Technologies used:- Selenium/WebDriver, Core Java, JUnit, TestNG, Maven, SoapUI. Jenkins, Appium, Selenium backed, and selenium remote driver. Have delved into the android phone/tab of version up to 6 (marshmallow), ios phone/I pad, and mobile websites.</p><p><a href="https://khyatisehgal.wordpress.com/author/khyatisehgal/">View all posts by Khyati Sehgal</a></p><p><em>Originally published at </em><a href="https://khyatisehgal.wordpress.com/2018/06/06/dealing-with-multiple-browsers-in-selenium/"><em>http://khyatisehgal.wordpress.com</em></a><em> on June 6, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef2928b314c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic commands to start working with git.]]></title>
            <link>https://medium.com/@khyati2010/basic-commands-to-start-working-with-git-3352c13680b0?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/3352c13680b0</guid>
            <category><![CDATA[getting-started]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[basic-commands]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[automation-testing]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Mon, 28 May 2018 11:39:44 GMT</pubDate>
            <atom:updated>2020-06-26T06:58:29.425Z</atom:updated>
            <content:encoded><![CDATA[<p>In one of my previous <a href="https://khyatisehgal.wordpress.com/2017/06/28/a-quick-beginners-guide-of-git/">blogs</a>, I have shared my experience of why we need to use ‘Git’. In this post, I will share basic commands to start with.</p><p>So let&#39;s get started.</p><p>To start with you need a machine where you want to use git. The choice would be Windows, iOs, Linux, etc. The links would be the same for the different operating system, you just need to choose the one best fits your computer system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BiHaZjDLtA74nArXuSNoqA.png" /></figure><p>On your windows box download git, you can use this link:-</p><p><a href="https://git-scm.com/download/win">https://git-scm.com/download/win</a> <a href="https://git-scm.com/downloads">https://git-scm.com/downloads</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/187/0*i9za527l4k-FZ0ad" /></figure><p>Once installed, type git in the windows search/startup window and you will see two options:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/0*cN2BB2B663DwTvep" /></figure><p><strong>Git Bash — </strong>will give you Linux like environment wherein you can work as a Linux operating system and perform git commands on bash.</p><p><strong>Git GUI</strong> — window users who do not have Linux box experience can use this to run git commands.</p><p>Another next thing you need to do is the creation of an account in GitHub, or connecting with the git official repository. For this, you need to simply sign up at <a href="https://github.com/">https://github.com/</a>. After this, you can directly push all your code directly from your local and can work on multiple branches/repository as and when required.</p><h3>Creating a repo</h3><p>Create a new repository on the command line</p><blockquote>touch README.md<br> git init<br> git add README.md<br> git commit -m “first commit”<br> git remote add origin git@github.com:khyati2010/.git<br> git push -u origin master</blockquote><p>Create a new repository from GitHub account by clicking on the new repository:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/514/0*CWrkAWWM9vbop8nt" /></figure><h3>Creating a new branch</h3><pre>git checkout -b <br>Switched to a new branch &#39;name-of-new-branch&gt;&#39;</pre><h3>Switching to an existing branch</h3><pre>git checkout</pre><h3>Deleting an existing branch</h3><pre>git branch -r <br>//This will list all the existing branches of the current repo. <br>git branch -d <br>//This will delete the branch from local <br>git branch -D <br>//This will delete the branch from globally</pre><h3>Cloning a repository</h3><p>Go to GitHub in the browser , select the URL of the repo you need to clone as shown below:-</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*QHxbFSiCwStMpJyC" /></figure><h3>Cloning via command line</h3><pre>git clone</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*kNrCOfEYbmuiTsH8" /></figure><h3>Initialising a repo</h3><pre>git init</pre><p>Go to the folder where you have a clone/downloaded the code, and hit init command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/616/0*odVcjI_-WdYyWXok" /></figure><h3>Checking the local changes</h3><pre>git status</pre><p>One can check the status of code by this command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*Qsex3hoGBHOhtYay" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/0*KQfbUhfcJH1omDGp" /></figure><h3>Adding local changes:-</h3><p>One can add all the local changes by this command</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/0*A97RIPSJR7K92ZIG" /></figure><h3>Saving local changes:-</h3><pre>git stash</pre><h3>Committing a code snippet:-</h3><p>One can commit in two ways:- One with commit message as shown below</p><pre>git commit -m &quot;message&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*b1SgrKBR4_z9EZZo" /></figure><p>and others without commit message</p><pre>git commit</pre><h3>Pushing the code to the local and remote repository</h3><pre>git push origin <br>// before you create a new branch, make sure you do a <br>git fetch <br>// that will pull the latest merge changes down for the develop branch</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*9D2cQrsByqaEC-hp" /></figure><h3>Merging code to master from the new branch</h3><pre>git fetch<br>git merge origin/master</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/0*iYzAby-Ah12XzGZM" /></figure><p>Published by Khyati Sehgal</p><p>Khyati has more than 8 years of experience in quality assurance engineering. Khyati has worked extensively on Manual and Automation testing of various technologies and domains like data quality. From last 6 years, She is leading QA Activities on Agile/Scrum projects while continuously contributing in playing role as a Scrum master, continuous integration, iteration planning, facilitating requirement analysis and closure. On automation front, She has explored gui, web services and mobile automation. Tools/ Technologies used:- Selenium/WebDriver, Core Java, JUnit, TestNG, Maven, SoapUI. Jenkins, Appium, Selenium backed and selenium remote driver. Have delve into android phone/tab of verison upto 6 (marshmallow), ios phone/i pad, and mobile websites <a href="https://khyatisehgal.wordpress.com/author/khyatisehgal/">View all posts by Khyati Sehgal</a></p><p><em>Originally published at </em><a href="https://khyatisehgal.wordpress.com/2018/05/28/basic-commands-to-start-working-with-git/"><em>http://khyatisehgal.wordpress.com</em></a><em> on May 28, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3352c13680b0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Running selenium scripts on browser Safari and Mac Operating System]]></title>
            <link>https://medium.com/@khyati2010/running-selenium-scripts-on-browser-safari-and-mac-operating-system-47f62ec65cd0?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/47f62ec65cd0</guid>
            <category><![CDATA[qa-automation]]></category>
            <category><![CDATA[cross-browser-testing]]></category>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[automation-testing]]></category>
            <category><![CDATA[selenium-test-automation]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Fri, 04 Aug 2017 12:30:56 GMT</pubDate>
            <atom:updated>2020-06-26T06:58:23.730Z</atom:updated>
            <content:encoded><![CDATA[<h3>Safari Logs</h3><pre>SafariDriver Launcher [ 0.007s] [safaridriver.client] Connecting to SafariDriver browser extension... [ 0.019s] [safaridriver.client] This will fail if you have not installed the latest SafariDriver extension from <a href="http://selenium-release.storage.googleapis.com/index.html">http://selenium-release.storage.googleapis.com/index.html</a> [ 0.020s] [safaridriver.client] Extension logs may be viewed by clicking the Selenium [✓] button on the Safari toolbar [ 0.071s] [safaridriver.client] Connected to extension [ 0.072s] [safaridriver.client] Requesting extension connect to client at ws://localhost:10975</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/1*pYnWsGAEXoUNe_lwyw_bSQ.jpeg" /></figure><h4>Eclipse Console logs</h4><p>[TestNG] Running:<br> /private/var/folders/0z/13848h057r56wcwp808shyhr3w4d0j/T/testng-eclipse-2105191378/testng-customsuite.xml<br> Jul 24, 2017 11:29:39 AM org.openqa.selenium.safari.SafariDriverServer start<br> INFO: Server started on port 10975<br> Jul 24, 2017 11:29:39 AM org.openqa.selenium.safari.SafariDriverCommandExecutor start<br> INFO: Launching Safari<br> Jul 24, 2017 11:29:39 AM org.openqa.selenium.safari.SafariDriverCommandExecutor start<br> INFO: Waiting for SafariDriver to connect<br> Jul 24, 2017 11:29:41 AM org.openqa.selenium.safari.SafariDriverChannelHandler$1 operationComplete<br> INFO: Connection opened<br> Jul 24, 2017 11:29:41 AM org.openqa.selenium.safari.SafariDriverCommandExecutor start<br> INFO: Driver connected in 1714 ms<br> Jul 24, 2017 11:29:41 AM org.openqa.selenium.safari.SafariDriverServer start<br> INFO: Server started on port 17885<br> Jul 24, 2017 11:29:41 AM org.openqa.selenium.safari.SafariDriverCommandExecutor start<br> INFO: Launching Safari<br> Jul 24, 2017 11:29:41 AM org.openqa.selenium.safari.SafariDriverCommandExecutor start<br> INFO: Waiting for SafariDriver to connect<br> Jul 24, 2017 11:29:43 AM org.openqa.selenium.safari.SafariDriverChannelHandler$1 operationComplete<br> INFO: Connection opened<br> Jul 24, 2017 11:29:43 AM org.openqa.selenium.safari.SafariDriverCommandExecutor start<br> INFO: Driver connected in 1665 ms<br> FAILED CONFIGURATION: @BeforeMethod testMethodStart<br> java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.directExecutor()Ljava/util/concurrent/Executor;<br> at org.openqa.selenium.safari.WebSocketConnection.send(WebSocketConnection.java:139)<br> at org.openqa.selenium.safari.SafariDriverCommandExecutor.execute(SafariDriverCommandExecutor.java:188)<br> at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:644)<br> at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)<br> at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)<br> at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:144)<br> at org.openqa.selenium.safari.SafariDriver.(SafariDriver.java:62)<br> at org.openqa.selenium.safari.SafariDriver.(SafariDriver.java:42)<br> at com.sod.utility.DriverInit.getDriver(DriverInit.java:90)<br> at com.sod.utility.MainClass.testMethodStart(MainClass.java:162)<br> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)<br> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)</p><h4>Solution</h4><p>I have seen many blogs around the internet and the below code is the simple solution of the above issue.<br> public static ThreadLocal ThreadDriver = new ThreadLocal();<br> protected static WebDriverWait wait;<br> protected static AppiumDriver adriver;<br> public static String browserType;<br> public static String OS;</p><p>public static WebDriver getDriver() throws InterruptedException, IOException {<br> OS = System.getProperty(“os.name”).toLowerCase();<br> WebDriver driver = ThreadDriver.get();<br> String workingDir = System.getProperty(“user.dir”);<br> if (driver == null) {<br> if (browserType.equals(“firefox”)) {<br> driver = new EventFiringWebDriver(new FirefoxDriver());<br> FirefoxProfile profile = new FirefoxProfile();<br> profile.setAssumeUntrustedCertificateIssuer(false);<br> profile.setAcceptUntrustedCertificates(false);<br> profile.setPreference(“dom.disable_beforeunload”, true);<br> ThreadDriver.set(driver);<br> getDriver().manage().timeouts().implicitlyWait(30000, TimeUnit.MILLISECONDS);<br> wait = new WebDriverWait(driver, 30);<br> }<br> if (browserType.equals(“chrome”)) {<br> if (isWindows()) {<br> System.setProperty(“webdriver.chrome.driver”, workingDir + “//driver//chromedriver.exe”);<br> } else if (isMac()) {<br> System.setProperty(“webdriver.chrome.driver”, workingDir + “//driver//chromedriver”);<br> } else if (isLinux()) {<br> System.setProperty(“webdriver.chrome.driver”, “/usr/bin/chromedriver”);<br> }<br> DesiredCapabilities capabilities = DesiredCapabilities.chrome();<br> ChromeOptions options = new ChromeOptions();<br> options.addArguments(“test-type”);<br> options.addArguments(“-start-maximized”);<br> options.addArguments(“-disable-web-security”);<br> options.addArguments(“-allow-running-insecure-content”);<br> capabilities.setCapability(“chrome.binary”, “./src//lib//chromedriver”);<br> capabilities.setCapability(ChromeOptions.CAPABILITY, options);<br> driver = new ChromeDriver(capabilities);<br> driver = new EventFiringWebDriver(new ChromeDriver());<br> ThreadDriver.set(driver);<br> if (isMac()) {<br> maximizeScreen();<br> }<br> getDriver().manage().timeouts().implicitlyWait(30000, TimeUnit.MILLISECONDS);<br> wait = new WebDriverWait(driver, 30);<br> }<br> if (browserType.equals(“ie”)) {<br> System.setProperty(“webdriver.ie.driver”, workingDir + “//driver//IEDriverServer.exe”);<br> driver = new EventFiringWebDriver(new InternetExplorerDriver());<br> ThreadDriver.set(driver);<br> getDriver().manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);<br> wait = new WebDriverWait(driver, 30);<br> }</p><p><strong>// System.setProperty(“webdriver.safari.driver”, workingDir +</strong> <strong>// “//driver//SafariDriverServer.exe”);</strong> <strong>DesiredCapabilities desiredCapabilities = DesiredCapabilities</strong> <strong>.safari();</strong> <strong>safariOptions.getUseCleanSession();</strong> <strong>// deleteCookies();</strong> <strong>// driver.manage().window().setSize(new Dimension(1024, 850));</strong> <strong>getDriver().manage().timeouts().implicitlyWait(3,</strong> <strong>}</strong> <strong>More Information</strong></p><p>Operating System — Mac Seirra 10.12</p><p>Safari version — 10.1.2 (12603.3.8)</p><p>Download SafariDriver.safariextz<strong> — </strong><a href="https://selenium-release.storage.googleapis.com/2.48/SafariDriver.safariextz">https://selenium-release.storage.googleapis.com/2.48/SafariDriver.safariextz</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/0*FRGTj__SybA87Cka" /></figure><p>Khyati has more than 8 years of experience in quality assurance engineering. Khyati has worked extensively on Manual and Automation testing of various technologies and domains like data quality. For the last 6 years, She is leading QA Activities on Agile/Scrum projects while continuously contributing to playing a role as a Scrum master, continuous integration, iteration planning, facilitating requirement analysis, and closure. On the automation front, She has explored GUI, web services, and mobile automation. Tools/ Technologies used:- Selenium/WebDriver, Core Java, JUnit, TestNG, Maven, SoapUI. Jenkins, Appium, Selenium backed, and selenium remote driver. Have delved into the android phone/tab of version up to 6 (marshmallow), ios phone/I pad, and mobile websites <a href="https://khyatisehgal.wordpress.com/author/khyatisehgal/">View all posts by Khyati Sehgal</a></p><p><em>Originally published at </em><a href="https://khyatisehgal.wordpress.com/2017/08/04/running-selenium-scripts-on-browser-safari-and-mac-operating-system/"><em>http://khyatisehgal.wordpress.com</em></a><em> on August 4, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=47f62ec65cd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A quick beginner's guide of git.]]></title>
            <link>https://medium.com/@khyati2010/a-quick-beginners-guide-of-git-7cfab5182c93?source=rss-a4386cb897f8------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cfab5182c93</guid>
            <category><![CDATA[automation-qa-testing]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Khyati Sehgal]]></dc:creator>
            <pubDate>Wed, 28 Jun 2017 10:58:49 GMT</pubDate>
            <atom:updated>2020-06-24T12:44:20.101Z</atom:updated>
            <content:encoded><![CDATA[<p>The team is when more than 2 people work on a small goal to achieve some concrete task. Every single day we get daily tasks to complete with timelines. From getting up for the office, to reach home back, from preparing food, to have lunch on time, from reaching the office on time, having dinner with family on time.</p><p>Hand-in-hand, we have similar official tasks that are prominent and can cause a problem if not met. So as a person all we need is tracking of time, things, tasks, and at the same time sharing the same work done or work in progress with each and every member be it a family member or team member.</p><p>So Collaboration is what we desire and always strive for. Let&#39;s talk a little bit more about how can we achieve it when we have given a piece of work to do so, for example, a website to make having a profile page, the home page, and browse page. Given there are 4 people who will work on these</p><blockquote>2 developers,</blockquote><blockquote>1 QA (Quality Analyst) and</blockquote><blockquote>1 BA (Business Analyst) / PO (Product Owner).</blockquote><p>Now how it works, Dev and QA will discuss the requirement with BA/PO and will divide the work amongst themselves to achieve the task given. Like this:-</p><ol><li>Home page and profile screen with GUI designing — Dev1</li><li>Backend(DB/Services) and browse screen — Dev2.</li><li>Automation and functional Testing — QA</li></ol><p>And they will start work. Now after two days, despite all Agile-meetings, dependencies on people will be developed as respective people will do their work on their local machines and there is no way they are sharing the code. So here the need for a central repository comes wherein all the team members can see the work which others are doing. They can check/review the code and suggestions can be given.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*JMv1tAJUVSLAGGAW" /></figure><p>This will reduce the risk, better code quality will be promoted and dependencies can be resolved. There are multiple ways via which this can be achieved, one of the ways is by using Git.</p><p><strong>The basic requirement of git.</strong></p><p>All you need is git credential wherein you can create your repositories and branches, that can be added in your project and git will do all the work for you.</p><p>I have used git both in Linux and Windows box, in this post I will share how can you start working with git on windows. Once you have git installed on window box same commands can be used for Linux, you will get to know the same later in the next write up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/0*CDskoMCkhozb-S1W" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/90/0*X9SZpAz_53JJo0nb" /></figure><p>Khyati has more than 8 years of experience in quality assurance engineering. Khyati has worked extensively on Manual and Automation testing of various technologies and domains like data quality. For the last 6 years, She is leading QA Activities on Agile/Scrum projects while continuously contributing to playing a role as a Scrum master, continuous integration, iteration planning, facilitating requirement analysis, and closure. On the automation front, She has explored GUI, web services and mobile automation. Tools/ Technologies used:- Selenium/WebDriver, Core Java, JUnit, TestNG, Maven, SoapUI. Jenkins, Appium, Selenium backed, and selenium remote driver. Have delved into the android phone/tab of version up to 6 (marshmallow), ios phone/I pad, and mobile websites <a href="https://khyatisehgal.wordpress.com/author/khyatisehgal/">View all posts by Khyati Sehgal</a></p><p><em>Originally published at </em><a href="https://khyatisehgal.wordpress.com/2017/06/28/a-quick-beginners-guide-of-git/"><em>http://khyatisehgal.wordpress.com</em></a><em> on June 28, 2017.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cfab5182c93" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>