Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-07-21 06:35 PM
Hi,
I am facing difficulty while attaching to different tabs on the chrome browser. So when I am trying to pass all the windows titles possible in a collection data item and then passing that collection as the property for Attach on Windows Title (as Collection) this was working for me on IE but not working on Chrome.
Kindly help me if you have any solution for this.
------------------------------
Pranav
SE
Infosys
Asia/Kolkata
------------------------------
Answered! Go to Answer.
1 BEST ANSWER
Helpful Answers
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-07-21 01:42 PM
Hi Pranav,
I've experienced the same because of the way that chrome spawns multiple processes even for a single window. If using the child index value doesn't work, you can also try looping through process IDs. You can use the "Read Memory Stats" action in the Environment utility to return the process IDs for all Chrome processes. The output is a collection which includes much data, including the PID (process ID) for the given application. It will also ALWAYS include the "idle" process with a PID of 0, so you should include a decision statement to ignore/skip that process ID in your attaching.
Once you have the collection of all the chrome processes/PIDs, create a loop to detach from your current connection, then attach to the next PID in the list. You can then include a wait stage for an element on the correct tab. If it is not found (exception occurs or wait timeout), detach from that PID and go to the next item in the collection.
I tried to upload a screenshot of my object doing this, but unfortunately it is blocked in my organization. If you have any issues/questions please reply here and I'll do my best to explain better.
------------------------------
Diane Sanzone
------------------------------
I've experienced the same because of the way that chrome spawns multiple processes even for a single window. If using the child index value doesn't work, you can also try looping through process IDs. You can use the "Read Memory Stats" action in the Environment utility to return the process IDs for all Chrome processes. The output is a collection which includes much data, including the PID (process ID) for the given application. It will also ALWAYS include the "idle" process with a PID of 0, so you should include a decision statement to ignore/skip that process ID in your attaching.
Once you have the collection of all the chrome processes/PIDs, create a loop to detach from your current connection, then attach to the next PID in the list. You can then include a wait stage for an element on the correct tab. If it is not found (exception occurs or wait timeout), detach from that PID and go to the next item in the collection.
I tried to upload a screenshot of my object doing this, but unfortunately it is blocked in my organization. If you have any issues/questions please reply here and I'll do my best to explain better.
------------------------------
Diane Sanzone
------------------------------
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
27-07-21 07:36 PM
Hi @Pranav,
You can use Child Index property to attach to the relevant tab.
------------------------------
Ritansh Jatwani Senior Consultant
Consultant
EY
Gurgaon
------------------------------
You can use Child Index property to attach to the relevant tab.
------------------------------
Ritansh Jatwani Senior Consultant
Consultant
EY
Gurgaon
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
28-07-21 01:42 PM
Hi Pranav,
I've experienced the same because of the way that chrome spawns multiple processes even for a single window. If using the child index value doesn't work, you can also try looping through process IDs. You can use the "Read Memory Stats" action in the Environment utility to return the process IDs for all Chrome processes. The output is a collection which includes much data, including the PID (process ID) for the given application. It will also ALWAYS include the "idle" process with a PID of 0, so you should include a decision statement to ignore/skip that process ID in your attaching.
Once you have the collection of all the chrome processes/PIDs, create a loop to detach from your current connection, then attach to the next PID in the list. You can then include a wait stage for an element on the correct tab. If it is not found (exception occurs or wait timeout), detach from that PID and go to the next item in the collection.
I tried to upload a screenshot of my object doing this, but unfortunately it is blocked in my organization. If you have any issues/questions please reply here and I'll do my best to explain better.
------------------------------
Diane Sanzone
------------------------------
I've experienced the same because of the way that chrome spawns multiple processes even for a single window. If using the child index value doesn't work, you can also try looping through process IDs. You can use the "Read Memory Stats" action in the Environment utility to return the process IDs for all Chrome processes. The output is a collection which includes much data, including the PID (process ID) for the given application. It will also ALWAYS include the "idle" process with a PID of 0, so you should include a decision statement to ignore/skip that process ID in your attaching.
Once you have the collection of all the chrome processes/PIDs, create a loop to detach from your current connection, then attach to the next PID in the list. You can then include a wait stage for an element on the correct tab. If it is not found (exception occurs or wait timeout), detach from that PID and go to the next item in the collection.
I tried to upload a screenshot of my object doing this, but unfortunately it is blocked in my organization. If you have any issues/questions please reply here and I'll do my best to explain better.
------------------------------
Diane Sanzone
------------------------------
