Hi, I am new to the UiPath. I want to open up the URLs from excel columns (A1, A2, A3…). The pages will either have the JPG image or the error 404. I want to mark the next columns (B1, B2, B3…) with “Error” or “No Error”. Could someone please help?
Kindly follow the below steps to get the issue resolved
- Excel application scope activity to open the excel. And pass the excel path as input
- Use read range activity to get the output with variable of type datatable named out_dt
- Use a for each row to iterate through each row in the table…by passing the input as out_dt
- Now use a open browser activity and us click and type into activity to pass the value of url like this in type into
- Then use a element exists or image exists activity to check whether the element you want exist or not
- Then use a write cell activity to update the column u want with input of sheetname and range be like this
“A” + counter.ToString
Where counter is a incrementing counter of type integer with default value as 1
- Thats all you are all done
Tty this and let know whether this works or not
Cheers buddy @Tapan
Hi Palaniyappan, I appreciate your help on this.
Looks like i am doing it wrong. I am not able to define variables correctly. Would you be able to look at the file with teamviewer by any chance?
Kindly send the xaml @Tapan
yah sure @Tapan
Building on this, instead of using element exists you could use screen scraping on the websites, and see if they contain 404 text. only if the two scenarios are image or 404 though.
I am unable to attach xaml. Tried that yesterday as i am a new user.
Here is your xaml its resolved
Main.zip (2.9 KB)
Kindly try this and let know whether this works or not
Hi Palaniyappan, Please see the error below-
The workflow has validation errors. Review and resolve them first.
Compiler error(s) encountered processing expression “row(“urlcolname”).ToStringRow(urlcolname). ToString”.
Option Strict On disallows late binding.
‘urlcolname’ is not declared. It may be inaccessible due to its protection level.
Hi @Tapan as i don’t what is your column name in your excel, i mentioned to tell you indicate the colunnname in your excel here
row(“columnname”).ToString, mention the column name in your excel
Did that work @Tapan
Nope, Unable to change that.
Unzip and try it must be in read only mode
Compiler error encountered processing expression “row(“urlcolname”).ToStringRow(urlcolname). ToString”.
Option Strict on disallows late binding.
urlcolname is not declared. It may be inaccessible…
no don’t mention any argument in tostring like this ToStringRow(urlcolname).
this alone row(“urlcolname”).ToString
And mention the columnname inside the double quotes
could you pls check it once via teamviewer?
ID- 1 173 796 068
i m not able to access the url
can you send the xaml or by personal message here in forum @Tapan
i tried from scratch, updated dependencies. Changed indicative screenshot and now error-
Source: Open Browser
Message: Column ‘urlcolname’ does not belong to table .
Exception Type: System.ArgumentException
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.ArgumentException: Column ‘urlcolname’ does not belong to table .
at System.Data.DataRow.GetDataColumn(String columnName)
at System.Data.DataRow.get_Item(String columnName)
at lambda_method(Closure , ActivityContext )
1.Execute(CodeActivityContext context) at System.Activities.CodeActivity1.InternalExecuteInResolutionContext(CodeActivityContext context)
at System.Activities.Runtime.ActivityExecutor.ExecuteInResolutionContext[T](ActivityInstance parentInstance, Activity
1 expressionActivity) at System.Activities.InArgument1.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance activityInstance, ActivityExecutor executor)
at System.Activities.RuntimeArgument.TryPopulateValue(LocationEnvironment targetEnvironment, ActivityInstance targetActivityInstance, ActivityExecutor executor, Object argumentValueOverride, Location resultLocation, Boolean skipFastPath)
at System.Activities.ActivityInstance.InternalTryPopulateArgumentValueOrScheduleExpression(RuntimeArgument argument, Int32 nextArgumentIndex, ActivityExecutor executor, IDictionary
2 argumentValueOverrides, Location resultLocation, Boolean isDynamicUpdate) at System.Activities.ActivityInstance.ResolveArguments(ActivityExecutor executor, IDictionary2 argumentValueOverrides, Location resultLocation, Int32 startIndex)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
FYI- I am not able to edit anything under -Open Browser - Input- Url- row(“urlcolname”).ToString
when i run it, the excel opens up and disappears and error comes up.
Thanks for your efforts…