473,416 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,416 developers and data experts.

Clicknium Automation Sample Solution - Customer Onboarding

  1. Clicknium Automation Sample Solution - Customer Onboarding


This is a sample of customer onboarding solution with clicknium web automation.

For one enterprise, customer onboarding has a significant impact on a customer willingness of using your product. You may define the customer onboarding process in your company internally,for example, new customer information adds into CRM(customer relationship management) system. If you can automatically process customer onboarding, the efficiency will be significantly improved. Here we demonstrate one customer onboarding automation solution.
  • load the missing customer information from CSV file.
  • open CRM system.
  • iterate the records in CVS file to register customer information into CRM.
  1. Run this sample
  • follow Clicknium getting started to set up develop environment.
  • clone sample repo.
git clone https://github.com/clicknium/clicknium-samples.git
  • open the folder 'CustomerOnboarding' in Visual Studio code.
  • through pip install the dependent packages.
requests is used to download the CSV file and pandas is used to read CSV file.

Expand|Select|Wrap|Line Numbers
  1. pip install requests
  2. pip install pandas
  • open app.py in Visual Studio Code.
  • press F5 to debug the sample or press CTRL+F5 to run sample.
You will see the result as below:


  1. The Purpose of the Sample
  • open the testing CRM web portal.
  • get the url of CSV.
  • download the CSV file.
Expand|Select|Wrap|Line Numbers
  1. tab = cc.edge.open("https://developer.automationanywhere.com/challenges/automationanywherelabs-customeronboarding.html")
  2. url = tab.find_element(locator.customeronboarding.developer.a_downloadcsv).get_property("href")
  3. excelFile = requests.get(url)
  4. temp_file = os.path.join(os.getcwd(), 'missing.csv')
  5. open(temp_file, 'wb').write(excelFile.content)
  6. data = pd.read_csv(temp_file)
  • iterate the records in CVS file to register customer information into CRM.

Expand|Select|Wrap|Line Numbers
  1. for idx, item in data.iterrows():
  2. tab.find_element(locator.customeronboarding.developer.text_customername).set_text(item[0])
  3. tab.find_element(locator.customeronboarding.developer.text_customerid).set_text(item[1])
  4. tab.find_element(locator.customeronboarding.developer.text_primarycontact).set_text(item[2])
  5. tab.find_element(locator.customeronboarding.developer.text_street).set_text(item[3])
  6. tab.find_element(locator.customeronboarding.developer.text_city).set_text(item[4])
  7. tab.find_element(locator.customeronboarding.developer.select_state).select_item(item[5])
  8. tab.find_element(locator.customeronboarding.developer.text_zip).set_text("%05d" % item[6])
  9. tab.find_element(locator.customeronboarding.developer.email_email).set_text(item[7])
  10. if item[8] == "YES":
  11.     tab.find_element(locator.customeronboarding.developer.radio_activediscountyes).set_checkbox()
  12. else:
  13.     tab.find_element(locator.customeronboarding.developer.radio_activediscountno).set_checkbox()
  14.  
  15. if item[9] == "YES":
  16.     nda = 'check'
  17. else:
  18.     nda = 'uncheck'
  19. tab.find_element(locator.customeronboarding.developer.checkbox_nda).set_checkbox(check_type=nda)
  20. tab.find_element(locator.customeronboarding.developer.button_submit_button).click()
In the code above, you can see:
  • The locator is separated from code, so the locator store can be managed independently. If the CRM system is upgraded, the locator will be changed as well and the locator store is updated accordingly.
  • Easy to select options from dropdown list: tab.find_element(<locator>).select_item(<option>)
  • Easy to check radio button/checkbox: tab.find_element(<locator>).set_checkbox()
  1. Locator
The Locator is the identifier of a UI element, which can be recorded and edited in clicknium vs code extension.

In this sample, you can open the locator in Visual Studio Code, for example:



Clicknium will automatically select the attribute to identify web element, and show all attributes of this element. It is easy to choose other attributes in Visual Studio Code as well as you want.
  1. Comparison with Selenium
  • You have to download the web driver in Selenium with the version matching exactly the browser. In this example, the Edge browser version is 103.0.1264.62, so there is a need to download the same version, MS Edge web driver first.
  • Selenium does not support checking operations with radio button, by click instead.
Expand|Select|Wrap|Line Numbers
  1. driver.find_element('id', 'activeDiscountYes').click()
  • Need to import additional class to wrapper to select options from the dropdown list.
Expand|Select|Wrap|Line Numbers
  1. from selenium.webdriver.support.select import Select
  2. Select(driver.find_element('id', 'state')).select_by_value(item[5])
  • Different running time In this sample, 7 records need to be filled, with each record submit 10 fields. From the log, we can see Clicknium is running faster than selenium.
Expand|Select|Wrap|Line Numbers
  1. [clicknium] Start to fill data:2022-07-21 16:10:15.938903
  2. [clicknium] End to fill data:2022-07-21 16:10:18.460162
  3.  
  4. [selenium] Start to fill data:2022-07-21 15:08:30.528693
  5. [selenium] End to fill data:2022-07-21 15:08:37.517574
  1. More samples

You can refer to more automation samples/solutions in clicknium github samples.
Send email to us or Join Slack.
Jul 25 '22 #1
0 5965

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Ravindra | last post by:
Well I installed the framework provided by microsoft , the problem is I am able to activate the smart tag in the doc file but when I Click on the Show Detils option in the information bridge the...
8
by: M O J O | last post by:
Hi, I'm creating an CRM solution for my company. I want to split up the solution into several classlibraries, so I dont need to build the entire solution every time I run my project. First...
4
by: Gaffar | last post by:
Hello. My name is Gaffar. I am handling an module in a Project. This application interface is slow and inefficient. So Client told "implement an AJAX Solution which will increase speed and...
1
by: JPK | last post by:
Hello Group, I am wondering if there is anyone on this list that has a sample ZenCart customer requirements document, or checklist of some sort that can facilitate us asking the right questions...
2
by: Leo Muller | last post by:
Hi, I am fiddling around a lot with ASP.NET, but still haven't found the best way of doing things. I was wondering whether anyone can give me a small sample solution, in which there is: -...
12
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is...
2
by: =?Utf-8?B?SmVmZnJleQ==?= | last post by:
I made a typo on a Project name (e.g. Wong, instead of Wang). Later on I renamed the Soution, Project, WebForm., etc, except the file folder name, back to Wang. Then after I closed the VS.net and...
0
by: mam | last post by:
Basic Qualifications: US Citizen Required onsite Chantilly, VA *3+ years of Software Testing hands on experience. *3+ years of QTP automation experince. *QTP Certification Required for Position ...
10
by: cj2 | last post by:
I open a word template in VB and add values to the bookmarks then save the document as as pdf. When I then go to close the document it pops up a save as dialog box. It's already saved the...
7
by: soule | last post by:
Hello, Fellow Users, I need a brave soul (or 5) to peruse this de-sensitized button code for any obvious or unobvious errors. In the VB editor, there are no red “error” lines of text...but I haven’t...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.