UiPath Foundation Exam Questions and possible answer

  1. Which activities can be used to interact with the user?
    Writeline
    Messagebox
    Input Dialog
  2. Which activities can you use if you want to loop through a collection of items?
    If Activity
    For Each Activity
    Assign Activity
    Flow Decision activity
  3. How can you fine tune a selector?
    Replacing variable attribute parts with *
    Making sure you have idx attribute
    Adding all parents
  4. As a best practice, how should workflows use a local desktop application?
    By using selectors to interact with the application
    By checking if the corresponding process is running and if not opening the application
    By closing the application once it’s no longer needed
    By opening the application using the Click image activity on the application’s desktop shortcut
  5. What is the attach window activity used for?
    Specifies that you are working with java window
    To specify the browser container you will be working with
    To specify the top-level window container you will be working with
  6. How does UiPath recognize elements on screen?
    Using screen coordinates
    Using the position of the UI Element
    Using attributes of the UI Element and their parents
  7. How should an RPA developer address runtime exception in the workflow?
    By logging any exception events
    By using try/catch blocks when invoking external workflow files
    By using automatic recovery sequences inside catch blocks
  8. What recording wizard would you use to generate partial selectors?
    Desktop recording
    Web Recording
    Citrix Recording
    Basic Recording
  9. By using the fulltext scraping method, the robot is able to
    Get hidden information
    Get editable text
    Get entire visible text
  10. What activity can you use to read an entire sheet from an excel file?
    Get Value
    Write CSV
    Read Range
    Read Cell
  11. What is considered a best practice in large projects?
    Breaking a large process in a smaller workflow
    Encapsulating most used activities in a single-activity workflow that can be invoked from another workflow
    Testing workflow independently
    Giving description names to variable and workflows
  12. What happens if you try to use write range activity to a .xls file that does not exist?
    It will continue the execution without writing the data
    It will create that file for you and write the data in it
    It will throw an error
  13. What activity allows you to customize the name of the sender when you are sending an email?
    Send Exchange mail message
    Send SMTP mail message
    Send Outlook mail message
  14. What is an argument?
    A variable
    An input/output parameter of the workflow
    A variable type
  15. There is an input field with the text “abc”. If you use the type activity with the text “123” and following property is set to simulate type checked, and EmptyField unchecked what will be the text in the field?
    Abc
    Abc123
    123
  16. How do you exit the selection mode?
    Right click
    ESC
    F3
    F2
  17. What happens if you use the write range activity with the range property set to “” to write a database to excel that already contains data?
    It will overwrite the existing data
    It will append the new data to the existing data
    It will throw an error
  18. How can you trigger another workflow from within your current one?
    By using the open application activity
    By using the invoke method activity
    By using the invoke workflow file activity
    You cannot trigger another workflow
  19. Creating automation in Citrix environment is challenging because
    You need to interact with the app using only image recognition and OCR
    You don’t have direct access to UI elements
    Selectors are hard to create for the virtual environment
  20. What activities can you use to send an email message?
    Send Outlook mail message
    Send IMAP mail message
    Send SMTP mail message
  21. Where can you see the activities that make up the workflow?
    In the workspace pane
    In the activities pane
    In the outline pane
  22. Is it possible to make an image automation if you are not in Citrix environment?
    No image automation is only for the remote automation
    Yes, but should be used as last resort
  23. Having an app in Citrix environment with multiple text-boxes that look the same, how do you identify one of them to type into?
    By using the partial selector
    By clicking relative to a unique text/image next to the textbox
    By using text-box element attribute
    You can’t identify it if it doesn’t have something unique next to it
  24. Can you run the robot manually, step by step, in order to analyze the robot behaviour in a certain condition?
    Yes, by running the workflow in debug mode
    Yes, by using a breakpoint and running the workflow in debug mode
    Yes, by using step into step over
    No, you can not do it
  25. How can you find all anchor element in the web page?
    Using find element activity
    Using find relative element activity
    Using the find children activity
  26. What would you use to exit from a For each activity and condition and continue the execution of the workflow?
    Break activity
    If Activity
    Terminate workflow activity
  27. What should you use to make sure that the workflow continues no matter what activity fails?
    Try catch activity
    ContinueOnError property
    TimeoutMS property
  28. Getting the content of the PDF document is possible
    This cannot be done by UiPath robot
    By opening the PDF and using screen scraping to get it’s data
    By using the read PDF text activity and providing the PDF file’s path
  29. What should you use to verify if a checkbox is selected or not?
    Get attribute activity
    A Trigger activity
  30. What happens if you send “123[k(enter)]” by using type into activity with SimulateType property selected?
    It will type “123” and then press enter key
    It will type”123” without press the enter key
    It will type “123[k(enter)]”
  31. What is sequence most suitable for?
    Short and simple workflows
    When we first start a project as the main workflow
    Pieces of automation that can be used in a large project
    Workflows that imply decision making
  32. What activities can be used to interact with the application in Citrix environment?
    Type into
    Click OCR Text
    Click Image
    Click Text
  33. What happens if you put a Breakpoint on a click activity and start what workflow in debug mode?
    The workflow will throw an error when it reaches that activity
    You can only put a breakpoint in break activity
    The workflow will be paused until you click the continue button
    The workflow will be paused for 5 seconds when it reaches that activity
  34. Which statement of the following statements is true regarding lists and Array?
    You can iterate through list using for each loop activity
    List items can be added using an add to collection activity
    Array and list elements can be accessed by index You can add any number of elements to an array
  35. What should you use to scrape tables from web page?
    Get text
    Data scraping
    Get OCR Text
  36. Which of the following input methods works in the background?
    Simulate Type/Click
    Window Messages
    Native
    Hardware event
  37. The Save attachments activity can save all the attachments of an email to:
    In a variable, as a collection of attachment objects
    A relative path
    An absolute path
  38. The Read PDF with OCR activity will throw an error if the following is not specified
    The OCR engine that is to be used
    The FileName property
    The text property
    The password property
  39. What are the supported wildcard characters for selectors in UiPath Studio?
    $
    ?
    *
    &
  40. Which activity should you use to click on the specific text in Citrix environment?
    Hover Text
    Click Text
    Click OCR Text
  41. What kind of workflow should you create to define business rules?
    State machine
    Flow chart
    Sequence
  42. What is the most effective way to handle the click on UI element that is not always available?
    By placing the click activity inside try/catch block
    By setting the continueonerror property of the click activity to true
    By using an element exists activity and then click activity
  43. What is timeoutMS property used for?
    To make sure that the workflow continues even if the activity fails
    To define the amount of time during which the target of an activity must be found
    To define the amount of time in which the robot will execute the activity
  44. Which of the following is a full selector?

45. How can UiPath identify an UI element on the screen?
By using an partial selector inside a container
By using full selector

 

 

======= SOME MORE==========

  1. Which of the following text scraping methods preserve the text position?

 

  • Native

 

  1. Full text

 

  • OCR

 

    1. The most important advantages of the fulltext method are:

 

  • It’s fast
  • It works in the background
  • it’s accurate

 

      1. It works in citrix environment
    1. What kind of workflow should you create to define business rule?

 

  • Flowchart

 

      1. Sequence

 

  • State machine

 

    1. Having an app in Citrix env. With multiple text-boxes that look the same, how can you identify them which one of them to type into?

 

  • By clicking relative to the unique text/image next to textbox

 

      1. By using partial selector
      2. By using text-box element attributes

 

  • You can’t identify it if it doesn’t have something unique next to it

 

    1. What activity should you use if you want to add to the existing .xslx document?
      1. Workbook write range
      2. Excel write cell

 

  • Excel append range

 

      1. Workbook append range
    1. Which of the scraping method can get you the hidden text in the element?
      1. Native
      2. All the options

 

  • FullText

 

      1. OCR
    1. What activity allows you to customize the name of the sender when you are sending an email?
      1. Send outlook mail message

 

  • Send SMTP mail message
  • Send Exchange Mail message

 

    1. What activity can you use to get a column value from a specific row of a DataTable?
      1. Read Cell

 

  • Get Row Item

 

      1. Remove Data Row
    1. Which of the following activities can you use to extract text from a hidden browser?
      1. Get Visible Text

 

  • Get Full Text

 

      1. Extract Structured Data

 

  • Get Text

 

    1. How can you improve the following calendar page selector to work only for dates in 2017?
      1. <html app=”chrome.exe” title=”UPath  – Calender – * />”

 

  • <html app=”chrome.exe” title=”UPath  – Calender – * 2017 />”

 

      1. <html app=”chrome.exe” title=”UPath  – Calender – Week of ?????, 2017 />”
      2. <html app=”chrome.exe” title=”UPath  – Calender – * 201? />”
    1. What is TimeoutMS property used for?
      1. To make sure that the workflow continues even if the activity falis
      2. To define the amount of time in which the robot will execute the activity

 

  • To define the amount of time during which the target of an activity must be found

 

    1. Which of the following input methods works in background?

 

  • Simulate Type/Click
  • Window Messages

 

      1. Native
      2. Hardware Event
    1. The save attachment activity can save all the attachments of an email to:

 

  • In a variable as a collection of attachment objects

 

      1. A relative path

 

  • An absolute path

 

    1. There is an input field with text “abc” if you use the type activity with text “123” and the following property SimulateType checked and EmptyField unchecked what will be the text field

 

  • Abc123

 

      1. Abc
      2. 123
    1. What kind of actions can be performed in the variable panel?

 

  • Setting default values for variables
  • Changing variable types
  • Adding new variables

 

    1. How can we make sure that an app is in a certain state in citrix?
      1. By checking the UI element’s attributes
      2. By waiting for certain UI element to appear or disappear and making decisions based on that
      3. By making use of the WaitForReady property
    2. Can you insert a flowchart activity in a sequence activity?

 

  • Yes

 

      1. No
    1. How should an RPA developer address runtime exception in the workflow?
      1. By using automating recovery sequence in catch blocks
      2. By using try/catch block when invoking external workflow files
      3. By logging any exception events
    2. What activity can you use to read an entire sheet from an excel file?
      1. Read Cell
      2. Rean Range
      3. Get Value
    3. How can UiPath identify an UI element on the screen?
      1. By using a partial selector inside container
      2. By using full selector
      3. By using reference of it, previously saved in a variable
    4. What is UiExplorer used for?
      1. To View Logs
      2. To explore workflow tree
      3. To create stable selector
      4. UiExplorer is not the part of UiPath
    5. What should you use the flowchart workflow?
      1. When having multiple activities executed in the fixed over

 

  • When modelling a process that has loops to previous states
  • When having a process with many decisions blocks

 

    1. How do you exit the selection mede?
      1. Right Click
      2. F3
      3. F2

 

  • ESC

 

    1. What is a sequence most suitable for?
      1. Workflows that imply decision making activity
      2. Pieces of automation that can be used in a large project
      3. When we first start a project as a main workflow
      4. Short and simple workflow
    2. What happens if you use the write range activity with range property set to “” to write a datatable to excel file that already contain data?
      1. It will overwrite the existing data
      2. It will appear the new data to the existing data
      3. It will throw an error
    3. What activities can be used to interact with application in the citrix env?
      1. Click Text
      2. Type into
      3. Click image
      4. Click OCR Text
    4. Can you hover the mouse over specific UI element?
      1. No there is no activity for this
      2. Yes, by using hover ocr text activity
      3. Yes, by using hover text activity
      4. Yes, by using hover image activity
    5. How can you find all anchor elements in the web page?
      1. Using find element activity
      2. Using the find relative element activity
      3. Using the find children activity
    6. How can you install and update activity packs?
      1. Using TFS
      2. Using manage package within activities pane
      3. In package pane
    7. What is the most effective way to handle the click on UI Element that is not always available?
      1. By using element exists activity and then click activity
      2. By placing the click activity inside try/catch block
      3. By setting the continueonerror property of the click activity to True
    8. What activities can you use to send an email message?
      1. Send outlook mail message
      2. Send SMTP mail message
      3. Send IMAP mail message
    9. How can a string variable called mystring be converted to an all capitals representation for future use?
      1. By using Assign Activity with mystring to the left and myString.ToUpper on the right side
    10. Will a click activity work with hidden browser session?
      1. Yes, if the SendWindowMessage property is selected
      2. Yes, it will work with the default configuration
      3. No, it will not work
      4. Yes, if teh SimulateClick property is selected
    11. What would you use to exit from a for each activity and continue the execution of the workflow?
      1. Terminate workflow activity
      2. If Activity
      3. Break activity
    12. Which activity can you see if you want to look through a collection of items?
      1. Flow decision activity
      2. If activity
      3. For each activity
      4. Assign activity
    13. Which activities can be used to interact with the user?

 

  • input Dialog

 

      1. Messagebox
      2. Write Log
    1. Where can you see the activities that makes us the workflwo?

 

  • In the outline pane

 

      1. In the activities pane
      2. In the workspace pane
    1. What is considered a best practice in large project?

 

  • Testing workflow independently
  • Giving descriptive names to variable and workflow
  • Encapsulating most used activities in single-activity workflow that can be invoked from other activity
  • Breaking a large process in smaller workflows

 

    1. What should you use to click in hideen IE browser?
      1. Click text
      2. Cursor position; center
      3. Default click activity

 

  • Simulate click

 

    1. What happens if you try to use a write range activity to a .xlsx file that does not exists?
      1. It will continue the execution without writing the data
      2. It will throw an error

 

  • It will create that file for you and write the data in it

 

    1. If the PDF activities are not listed in your activities panel how can you get them?
      1. By installing them using message package feature
      2. By going to the output panel
      3. By finding them in the library panel
    2. What should you use to scrape tables from web page?
      1. Get OCR text
      2. Get Text

 

  • Data Scraping

 

  1. What is wildcard used for?
    1. To get text from screen
    2. To select items in list
    3. To replace variable values in selector attributes
  2. What should you use to make sure that the workflow continue no matter what activity fails?
    1. ContinueOnError property
    2. TimeoutMS property
    3. Try Catch Activity
  3. The Read PDF with OCT activity will throw an error if the following is not specified:
    1. The OCR Engine that is to be used
    2. The file name property
Advertisements

Filtering docker images

docker images | grep [filter]

docker images -f

-f, --filter value    Filter output based on conditions provided (default [])
                        - dangling=(true|false)
                        - label=<key> or label=<key>=<value>
                        - before=(<image-name>[:tag]|<image-id>|<image@digest>)
                        - since=(<image-name>[:tag]|<image-id>|<image@digest>)
                        - reference=(pattern of an image reference)

Adding existing directory to git

steps to add an existing directory to git

cd c:\directory
git init
git add .
git commit -m “init commit”
git remote add origin git@bitbucket.org:gitprojectname/reponame
git push origin master

Sequence with TSQL

We keep an unique column in every table in the database to have primary key clustered index created on it and mostly they are IDENTITY or ROWGUID. Have you ever faced a situation where you need to update a column with sequence number in an existing table or temp table? I will explain 4 different methods here to achieve the same.

SETUP:

CREATE TABLE #Employee
(Name varchar(100)
,Hiredate datetime
,Stat varchar(10))
INSERT INTO #Employee (Name, Hiredate, Stat)
VALUES ('Adams  Alex', '2001-01-01 00:00:00.000', 'Active')
, ('Brown   Barry', '2000-01-01 00:00:00.000', 'On Leave')
, ('Osako   Lee', '2009-06-11 00:00:00.000', 'Active')
, ('Kennson David', '1996-03-16 00:00:00.000', 'Has Tenure  ')
, ('Haire   Terry', '2001-11-15 00:00:00.000', 'On Leave')
, ('Smith   Sally', '1989-04-01 00:00:00.000', 'Active')
Method 01: (Using IDENTITY)

ALTER TABLE #Employee
ADD ID INT IDENTITY(1,1)
GO
SELECT * FROM #Employee
GO
--Droping the column for next examples
ALTER TABLE #Employee
drop column ID
Method 02: (Using local variable)

ALTER TABLE #Employee
ADD ID INT
GO
DECLARE @i INT = 0
UPDATE #Employee
SET @i = ID = @i + 1
SELECT * FROM #Employee
--OR--
GO
DECLARE @i INT = 0
UPDATE #Employee SET ID = NULL
UPDATE #Employee SET Id = @i , @i = @i + 1
SELECT * FROM #Employee
Method 03: (Using CTE)

UPDATE #Employee SET ID = NULL
;WITH CTE AS (
SELECT ROW_NUMBER() OVER(ORDER BY Hiredate) AS ID, Name FROM #Employee
)
UPDATE a
SET ID = b.ID
FROM #Employee a
INNER JOIN CTE b ON a.Name = b.name
SELECT * FROM #Employee
Method 04: (Using SEQUENCE)

UPDATE #Employee SET ID = NULL
GO
CREATE SEQUENCE idnum
START WITH 1
INCREMENT BY 1
NO MAXVALUE
NO CYCLE
GO
UPDATE #Employee
SET id = NEXT value FOR idnum
SELECT * FROM #Employee
GO
DROP SEQUENCE idnum --Droping the sequence

Convert rows to column using pivot

DECLARE @t AS TABLE (key1 varchar(25), [Soucecolumn Name] varchar(25), ColumnValue varchar(25)) 
INSERT INTO @t VALUES 
('8308862', 'Name', '1a234'),
('8308862', 'GrossTons', '1a235'),
('8308862', 'CallSign', '1a236'),
('8308862', 'YearofBuild','1a237'),
('8308862' ,'Type','1a238'),
('8308862','Date','1a239'),
('8308862', 'NetTons','1a245'),
('8308862','OfficialNumber','1a247'),
('8308862','PlaceofBuild','1a278'), 
 --For other key
('8308863', 'Name', '1a234'),
('8308863', 'GrossTons', '1a235'),
('8308863', 'CallSign', '1a236'),
('8308863', 'YearofBuild','1a237'),
('8308863' ,'Type','1a238'),
('8308863','Date','1a239'),
('8308863', 'NetTons','1a245'),
('8308863','OfficialNumber','1a247'),
('8308863','PlaceofBuild','1a278')

SELECT key1, [Name], [GrossTons] ,[CallSign],[YearofBuild],
[Type], [Date],[NetTons],[OfficialNumber],[PlaceofBuild]
FROM @t 
PIVOT (MAX(ColumnValue) FOR [Soucecolumn Name] IN ([Name], [GrossTons],[CallSign],[YearofBuild],
[Type], [Date],[NetTons],[OfficialNumber],[PlaceofBuild])) AS pvt

Convert database table to c# class using tsql

TSQL script to get c# class from database tables

declare @TableName sysname = 'ImportJobTrigger'
declare @Result varchar(max) = 'public class ' + @TableName + '
{'

select @Result = @Result + '
public ' + ColumnType + NullableSign + ' ' + ColumnName + ' { get; set; }
'
from
(
select
replace(col.name, ' ', '_') ColumnName,
column_id ColumnId,
case typ.name
when 'bigint' then 'long'
when 'binary' then 'byte[]'
when 'bit' then 'bool'
when 'char' then 'string'
when 'date' then 'DateTime'
when 'datetime' then 'DateTime'
when 'datetime2' then 'DateTime'
when 'datetimeoffset' then 'DateTimeOffset'
when 'decimal' then 'decimal'
when 'float' then 'float'
when 'image' then 'byte[]'
when 'int' then 'int'
when 'money' then 'decimal'
when 'nchar' then 'char'
when 'ntext' then 'string'
when 'numeric' then 'decimal'
when 'nvarchar' then 'string'
when 'real' then 'double'
when 'smalldatetime' then 'DateTime'
when 'smallint' then 'short'
when 'smallmoney' then 'decimal'
when 'text' then 'string'
when 'time' then 'TimeSpan'
when 'timestamp' then 'DateTime'
when 'tinyint' then 'byte'
when 'uniqueidentifier' then 'Guid'
when 'varbinary' then 'byte[]'
when 'varchar' then 'string'
else 'UNKNOWN_' + typ.name
end ColumnType,
case
when col.is_nullable = 1 and typ.name in ('bigint', 'bit', 'date', 'datetime', 'datetime2', 'datetimeoffset', 'decimal', 'float', 'int', 'money', 'numeric', 'real', 'smalldatetime', 'smallint', 'smallmoney', 'time', 'tinyint', 'uniqueidentifier')
then '?'
else ''
end NullableSign
from sys.columns col
join sys.types typ on
col.system_type_id = typ.system_type_id AND col.user_type_id = typ.user_type_id
where object_id = object_id(@TableName)
) t
order by ColumnId

set @Result = @Result + '
}'

print @Result

find open port on machine

You can use the NETSTAT command to quickly see all the used and listening ports on your computer. Note it is not a complete substitute for a port scanning tool. If you’d like to have your computer remotely scanned for open ports use our Security Scan instead.

To see a list of listening ports, open Command Prompt and type:

C:\> netstat -an |find /i “listening”

You can change “listening” to “established” to see what ports your computer actually communicates with.

It is also useful to use the -o switch with the NETSTAT command to also get a list of all the owning process ID associated with each connection. You can then use those process ids (PIDs) to find out the name of the processes associated with open/listening ports in the Windows Task Manager

C:\> netstat -ao |find /i “listening”

To see all open, closing, established and listening ports, simply use:

C:\> netstat -a (or netstat -ao in XP/Win2k3)

You can also make the netstat command refresh periodically by adding a number of seconds at the end, for example, to make it refresh every 5 seconds, use something like:

C:\> netstat -an 5