How-To Automate Google Chrome Using Foxtrot & Python (Selenium)

Follow

Comments

7 comments

  • Avatar
    Ghita Maria Fjorback

    Hi Mathias

    Is there any way of using Foxtrot with Python actions in Chrome, when Chrome has been opened via a "link" rather than via Foxtrot. I have an example where a user is in an ERP system, and clicks a link, this link will open up a table in a website. The preferred browser will always be used, and as this is Chrome and not IE, we cannot have Foxtrot working in this table. I would like to be able to get the table imported into foxtrot.

    0
    Comment actions Permalink
  • Avatar
    Mathias Balsløw

    Hi Ghita Maria Fjorback,

    Unfortunately, this is not possible what you describe, if I understand you correctly. For Python (Selenium) to be able to connect and hereby automate in Chrome, you need to know the port number and user profile path. So you will have to have Foxtrot or the user open Chrome setting this as explained in the article (https://support.foxtrotalliance.com/hc/article_attachments/360025684172/2019-04-07_09-59-23.png) for it to work.

    Could it be possible for the user instead of clicking the link that they simply copy the link, then you could have your script start with a value in the Windows Clipboard defining the target URL. Then you can use the value to open the link in either IE or Chrome.

    0
    Comment actions Permalink
  • Avatar
    Ghita Maria Fjorback

    Hi Mathias

    No, unfortunately there is no link to copy. It is actually not a "link" that is clicked, this was wrongly explained by me. It is the customs system of Toldstyrelsen in Denmark. In this system, you can put in the reference of a custom clearance, and once you want to check the status of the reference, a webpage is automatically opened. The browser will be your preferred browser always.

    0
    Comment actions Permalink
  • Avatar
    Mathias Balsløw

    Hi Ghita Maria Fjorback,

    Could you then have Foxtrot grab the URL of the opened Google Chrome window to then open a new window via either IE or Chrome where Foxtrot is connected to the browser and then do whatever needs to be done?

    0
    Comment actions Permalink
  • Avatar
    Ghita Maria Fjorback

    I Mathias

    I guess I can, by the help of a Python action to find the address line and copy the value. I will have to test this next time I am with the client.

    Ghita

    0
    Comment actions Permalink
  • Avatar
    Mathias Balsløw

    Hi Ghita Maria Fjorback,

    Just target the whole Chrome window with Foxtrot, then use a Send Value action with:

    0
    Comment actions Permalink
  • Avatar
    Ghita Maria Fjorback

    hehe, yes, that was a lot easier. I am quite sure my client does not have IE at all anymore, as their IT has decided this is no longer part of the software the company want, but the link copied would then be possible to use with this article theme! Thanks a million.

    0
    Comment actions Permalink

Please sign in to leave a comment.