472,779 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 472,779 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()
  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
  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 5776

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

Similar topics

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...
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...
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...
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...
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: -...
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...
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...
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 ...
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...
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...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.