473,287 Members | 3,253 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,287 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 5944

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.