Not Reliable a Selector

Using Data scraping method i have scrapping 10-15 fields from web application. while scraping the details i can able to view the scraped items in scraped wizard. But when i run the program there is data in my Data Table. After doing deep dive analysis it was identified that my selector is changing on every method.

Eg: When i run the first time my selector is like as " <html app= ‘chrome.exe’, Title= ‘ABCDAPP1| Dealer portal’>

Next time title will be changed like as "Title= ‘ABCDAPP2 /3/4| Dealer portal’>.

Hence i had used wild card method and verified the Meta data for two Data scraping. Meta data are same but again getting an error like as “Object reference not a null value”. Please advise.

@BaskaranVenkatesan

Could you please show me screenshot of your new selector.

Hi @BaskaranVenkatesan,

If the selector is keep changing that way then, make that selector dynamic

here i’ll suggest you to try this one.
<html app= ‘chrome.exe’, Title= ‘*| Dealer portal’>

Hi Samir, Thanks for your response. Now i can able to write DT in excel. But i have facing one problem here. Using this DT i want to click the invoice number 1by1. Inner for each activity i had added assign activity to read cell one by one.

ClickInvoice= row.item(“Invoice#”)

when run the bot its clicking the first invoice get the details, then it’ll go back again clicking the same invoice number not next one. Please advise.

hey @BaskaranVenkatesan,

For that, e.g.

From this, If ABCDAPP1, ABCDAPP2 are Invoices then you have to store this value in variable and pass that variable in click activity selector.
follow the steps below.

  1. Take For Each Row acticivity —> row In DT
  2. Inside For Each Row, take Assign —> ClickInvoice= row.item(“Invoice#”).ToString
  3. you’ve to use ClickInvoice variable in your click activity selector.
    <html app= ‘chrome.exe’, Title= ‘"+ClickInvoice.ToString+"’>

by using for each row you’ll able to iterate through all invoice and store that value in variable, and then putting that variable in selector you can able to click on all those invoices. :slight_smile:

Hi Samir, Thanks for your reply, i had tried above but again facing same issue. Please find below screen shot of selectors for Attach browser and clicking the invoice.

image

Original selector for attach browser is “”. I had used * in the title due to changing the invoice number for each time.

My click activity selector is “
”.

And I had passed the assigned activity variable in “aaname” but getting same error.

Note: Also i have tried, assign the Click variable was passed to “title” but getting same error. Please advise.

hey if you share the selector of click activity for any invoice then it’ll be easy for me to get the problem. @BaskaranVenkatesan

@BaskaranVenkatesan

You need to click on any specific invoice number Or you want click on all the invoice number in the datatable?

if that is the case then use do-while Condition is (yourDatatable.count-1)=counter
assign a variable called count with value 1 and counter inside the loop
then inside that use click activity and try to change the selector with attributes like RowNumber or columnNumber .try to find manually capture the all selectors and find which of the value is changing dynamically
selector will look Like
<html app= ‘chrome.exe’, Title= ‘"Something"’,Row=+Counter.tostring+,column=2** or **<html app= ‘chrome.exe’, Title= ‘“Something”’,Row=2,column=+Counter.tostring

Hope this helps

still having issues just post the screenshot of the invoice element selector of 2 various elements in that table

My Selector for click activity using UI Explorer. Here Parent ID 1st digit and invoice num will be change for every invoice.
image

Hi Sriram, thanks for your reply. I’ll check and let you know. First invoice selector has been uploaded already. Please find the below screen short for second one.
image
Also when i’m doing Data Scraping before invoice click, my first inovice # was automatically moved to last row. Is there any problem for this?. Please advise.

@BaskaranVenkatesan,

just copy paste this selector.

<html app='chrome.exe' title='All Invoices: "+ClickInvoiceNum+"'/><webctrl name='Invoice Number' parentid='*Invoice_Number' tag=A'/>

Hi Samir, Again getting same error when i use above selector. Currently i’m doing comparison for all the invoice # click activity to identify the changes.

yeah exactly and use variables & *. to make it dynamic
other than that, I’ll suggest you

  1. to check Invoice Number by printing it in writeLine and if there’s blank space before or after then, you need to use trim on it.
  2. to make use of highlight option in selector editor by putting different invoice numbers so it’ll help you to check whether that selector is working or not.

@BaskaranVenkatesan
Fine If possible ! will you show me the screen(webpage) or share your workflow.

because i didn’t get the above quoted text.

Hi Sriram, Good Day!

I have an alternate way to get the require fields in web application Instead of clicking all the invoice one by one. I want to click only one invoice number and extract all the line items from particular invoice. Hence i had used data scraping method for extract the required fields in all the line items. scraped fields are stored in InvoicelineItemsDT. When i tried to write the DT in excel or msg box “InvoiceLineItemsDT.rows.count” getting an error message like as “Message Box: Object reference not set to an instance of an object.”

Hence i had scrapped 2-3 times. When i compare my Meta data and Extract DT Selector with other one both are same but i unable to get the details. Please find the below selector for 3 different scraping for same invoice number. Please advise.

image

Hi Samir, Good Day!
Hope you’re doing good.

I have an alternate way to get the require fields in web application Instead of clicking all the invoice one by one. I want to click only one invoice number and extract all the line items from particular invoice. Hence i had used data scraping method for extract the required fields in all the line items. scraped fields are stored in InvoicelineItemsDT. When i tried to write the DT in excel or msg box “InvoiceLineItemsDT.rows.count” getting an error message like as “Message Box: Object reference not set to an instance of an object, passing null value.”

Hence i had scrapped 2-3 times for same invoice#. When i compare my Meta data and Extract DT Selector with other one, all are same but i unable to get the details. Please find the below selector for 3 different scraping for same invoice number. Please advise.

image

I had changed the selector dynamically like “<html app=‘chrome.exe’ title='Invoice Line Item Details: * />
”. But this time also getting an error.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.