create account

Getting Started With UI Automation by codingdefined

View this thread on: hive.blogpeakd.comecency.com
· @codingdefined · (edited)
$0.95
Getting Started With UI Automation
When we are working on a feature, it sometimes happens that we might introduce a bug. Now there are testers who will found these bugs, but it's actually a burden for them as they have to go through each and every test case again. This is where automation tests will come into the picture,

![](https://images.hive.blog/0x0/https://images.pexels.com/photos/160107/pexels-photo-160107.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940)
PC: Pexels.com

According to [Softwaretestinghelp](https://www.softwaretestinghelp.com/automation-testing-tutorial-1/),

>Automation testing is a Software testing technique to test and compare the actual outcome with the expected outcome. This can be achieved by writing test scripts or using any automation testing tool. Test automation is used to automate repetitive tasks and other testing tasks which are difficult to perform manually.

But basically as a C# developer and an Angular developer, we usually cover the code with our developer unit tests so basically almost all the functional part is covered. Recently we were facing issues with the UI and thus UI Automation Testing was a need of the hour. UI Automation tests are nothing but checking if the UI is working fine or not, that means the button is clickable, the website is working in different browsers or in different browser's language etc.

In one of my previous post # [Supporting Multiple Browsers for Web Developers](https://peakd.com/hive-174578/@codingdefined/supporting-multiple-browsers-for-web-developers), 

>One thing which we have to take care of is supporting multiple browsers, that means Chrome, Firefox, IE and Edge all these browsers have to be supported. The problem arises when some things work on some browsers but do not work on other browsers like recently I have to modify the scroll bar to make it touch-friendly, the easiest option is to change the CSS which works only in case of chrome but other browsers we don't have that option. Similarly, even if some of the browsers are on the same technology still some browsers support something whereas some browsers don't.

Thus one of the use cases for UI automation tests was to test our code in all different browser all at once instead of manually checking it everywhere. We were testing some of the frameworks, but at last, zeroed at Specflow. 

![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/ymuCGYC2-image.png)

The good part of spec flow is that writing automated tests is so easy, just like plain text. As you can see below, if I am making a Calculator and if I want to see additional functionality is working fine or not, it's as easy as writing just like below. Though I also need to add a function which will return the addition of 50 and 70, but i.e. just one line of code.

![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/ann33vdR-image.png)

The above example is just a normal code example, but what we had to do for UI Automation is to

1. Launch the Browser with the test URL
2. Find any element you want to test, like a Button or Label
3. Check if the Button is clickable or check if the label is displayed or not or etc.

These all things are just an example of how easy to get started, though we do have spent some time in creating the framework for UI Automation, and now all the developers whoever is writing UI component have to write the UI Automation test cases. This I think is one of the good addition along with unit tests because in that way we will not miss the obvious UI bug which we (developers and testers) might have missed. Now with this change, we are writing Code, Unit Tests, Integration Tests and also the UI Tests and though it adds up some time for developers to deliver their task still now we are less prone of delivering the obvious bugs which we might send to the testers (why make their life easy). 

---
<center>[![image.png](https://files.peakd.com/file/peakd-hive/codingdefined/C0NEINQq-image.png)](https://www.codingdefined.com/)
[
![image.png](https://files.peakd.com/file/peakd-hive/bala41288/46eaz12N-image.png)](https://discord.gg/bGmS2tE)
</center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
👎  
properties (23)
authorcodingdefined
permlinkgetting-started-with-ui-automation
categoryhive-174578
json_metadata"{"app":"peakd/2020.07.1","format":"markdown","description":"Automation testing is a Software testing technique to test and compare the actual outcome with the expected outcome.","tags":["india","palnet","neoxian","technology","coding","testing","ctp","automation","developer","posh"],"users":["codingdefined"],"links":["https://www.softwaretestinghelp.com/automation-testing-tutorial-1/","/hive-174578/@codingdefined/supporting-multiple-browsers-for-web-developers","https://www.codingdefined.com/","https://discord.gg/bGmS2tE"],"image":["https://images.pexels.com/photos/160107/pexels-photo-160107.jpeg?auto=compress&amp;cs=tinysrgb&amp;dpr=2&amp;h=650&amp;w=940","https://files.peakd.com/file/peakd-hive/codingdefined/ymuCGYC2-image.png","https://files.peakd.com/file/peakd-hive/codingdefined/ann33vdR-image.png","https://files.peakd.com/file/peakd-hive/codingdefined/C0NEINQq-image.png","https://files.peakd.com/file/peakd-hive/bala41288/46eaz12N-image.png"]}"
created2020-07-10 11:52:57
last_update2020-07-10 12:00:15
depth0
children12
last_payout2020-07-17 11:52:57
cashout_time1969-12-31 23:59:59
total_payout_value0.484 HBD
curator_payout_value0.469 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,114
author_reputation529,483,946,299,154
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,441,074
net_rshares3,458,761,778,993
author_curate_reward""
vote details (34)
@codingdefined ·
#posh https://twitter.com/codingdefined/status/1281558636846710784
properties (22)
authorcodingdefined
permlinkre-codingdefined-qd95bj
categoryhive-174578
json_metadata{"tags":["hive-174578"],"app":"peakd/2020.07.1"}
created2020-07-10 11:59:45
last_update2020-07-10 11:59:45
depth1
children0
last_payout2020-07-17 11:59:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length66
author_reputation529,483,946,299,154
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,441,174
net_rshares0
@gitplait-mod2 ·
Thanks for sharing this. With little knowledge in coding it's quite interesting and understanding reading your post. 

Thanks again.

<sub> **Your post has been submitted to be manually curated by @gitplait community account because this is the kind of publications we like to see in our community.** </sub>

Join our [Community on Hive](https://hive.blog/trending/hive-103590) and Chat with us on [Discord](https://discord.gg/CWCj3rw).

[[Gitplait-Team]](https://gitplait.tech/)

properties (22)
authorgitplait-mod2
permlinkre-codingdefined-qd9a1b
categoryhive-174578
json_metadata{"tags":["hive-174578"],"app":"peakd/2020.07.1"}
created2020-07-10 13:41:36
last_update2020-07-10 13:41:36
depth1
children1
last_payout2020-07-17 13:41:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length481
author_reputation28,898,670,427
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,442,524
net_rshares0
@codingdefined ·
Thanks a lot
properties (22)
authorcodingdefined
permlinkre-gitplait-mod2-2020711t0034137z
categoryhive-174578
json_metadata{"tags":["esteem"],"app":"esteem/2.2.5-mobile","format":"markdown+html","community":"hive-125125"}
created2020-07-10 18:30:36
last_update2020-07-10 18:30:36
depth2
children0
last_payout2020-07-17 18:30:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length12
author_reputation529,483,946,299,154
root_title"Getting Started With UI Automation"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,446,931
net_rshares0
@looftee ·
Wow, though I don't understand coding, it feels like this is a big thing.

I heard software testing is a big in demand job. So, if this is automated, people will lose their jobs?
properties (22)
authorlooftee
permlinkre-codingdefined-qd9krf
categoryhive-174578
json_metadata{"tags":["hive-174578"],"app":"peakd/2020.07.1"}
created2020-07-10 17:33:15
last_update2020-07-10 17:33:15
depth1
children4
last_payout2020-07-17 17:33:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length178
author_reputation22,447,007,592,745
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,446,018
net_rshares0
@codingdefined ·
Automated testing has replaced a lot of manual testers, but there are quite a few things which cannot be automated and thus though we still need a lot of testers in software world
properties (22)
authorcodingdefined
permlinkre-looftee-2020710t234710615z
categoryhive-174578
json_metadata{"tags":["hive-174578"],"app":"esteem/2.2.5-mobile","format":"markdown+html","community":"hive-125125"}
created2020-07-10 18:17:12
last_update2020-07-10 18:17:12
depth2
children3
last_payout2020-07-17 18:17:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length179
author_reputation529,483,946,299,154
root_title"Getting Started With UI Automation"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,446,718
net_rshares0
@looftee ·
Ahh, nice...I have a couple of friends who changed their profession and moved to testing.

They joined in infosys about 7-8 years ago, got a project in UK...and been there since 5 years.
properties (22)
authorlooftee
permlinkre-codingdefined-qd9n3b
categoryhive-174578
json_metadata{"tags":["hive-174578"],"app":"peakd/2020.07.1"}
created2020-07-10 18:23:36
last_update2020-07-10 18:23:36
depth3
children2
last_payout2020-07-17 18:23:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length186
author_reputation22,447,007,592,745
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,446,821
net_rshares0
@potta ·
I use Jest/Mocha/Chai. Seems like this will do the same thing in the .NET world? 
properties (22)
authorpotta
permlinkre-codingdefined-qdc40k
categoryhive-174578
json_metadata{"tags":["hive-174578"],"app":"peakd/2020.07.1"}
created2020-07-12 02:24:21
last_update2020-07-12 02:24:21
depth1
children3
last_payout2020-07-19 02:24:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length81
author_reputation15,544,222,497,244
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,471,633
net_rshares0
@codingdefined ·
I think those three are more for Javascript, if I am not wrong
properties (22)
authorcodingdefined
permlinkqdcoaa
categoryhive-174578
json_metadata{"app":"hiveblog/0.1"}
created2020-07-12 09:42:12
last_update2020-07-12 09:42:12
depth2
children2
last_payout2020-07-19 09:42:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation529,483,946,299,154
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,475,800
net_rshares0
@potta ·
Well isn't UI all JS now anyways? .NET/Java is on the server side, no?
properties (22)
authorpotta
permlinkqdcy0d
categoryhive-174578
json_metadata{"app":"hiveblog/0.1"}
created2020-07-12 13:12:12
last_update2020-07-12 13:12:12
depth3
children1
last_payout2020-07-19 13:12:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length70
author_reputation15,544,222,497,244
root_title"Getting Started With UI Automation"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id98,478,560
net_rshares0