Iexplorer opens with two tabs "some times"

Comments

9 comments

  • Avatar
    Tatyana Falaleeva

    Hi Ghita,

    we have experienced in some cases the error "Unable to kill the process". However, it actually kills the process. So I would recommend to set the action to Ignore error and see if that helps.

    0
    Comment actions Permalink
  • Avatar
    James Brammer

    For the parts about the old tabs, could your IE options be set to keep old tabs when you reopen browsers? Or to not always open to a new window at the home page?

    0
    Comment actions Permalink
  • Avatar
    Ghita Fjorback

    This is the third time I am trying to reply on this matter. My replies is just not being saved. Now I am trying from Chrome instead of IE.

    @ Tatyana - The Ignore error does not work in this case. I use that other places, but in this case with IE it does not work. I believe the whole issue is, that there is more than one process running with the exact same Process Name. I believe that Foxtrot does not "know" which of the processes to close, since there is more process' wit that particular name.

    @James - Unfortunately we are not allowed to make settings like that on user level.

    0
    Comment actions Permalink
  • Avatar
    Tatyana Falaleeva

    Hi Ghita,

    Foxtrot should kill all processes at once if there is more than one, unless it is something different. I would recommend to use Get Process action and see if you can identify the 2 processes. You could use Main Window Title column to use in an if statement to check if there is still a process running. This is how it looks for me with one tab opened:


    If you can't make it stop, you could use a shortcut to close the tab.

    0
    Comment actions Permalink
  • Avatar
    James Brammer (Edited )

    Powershell action to close all IE processes, including anything orphaned?

     

    If (Get-Process "iexplore" -ErrorAction SilentlyContinue) { Get-Process "iexplore" | Stop-Process }

     

    Unless it's running as a user Foxtrot can't override.

    0
    Comment actions Permalink
  • Avatar
    Ghita Fjorback

    Thank you James, I believe something like this is exactly what I need.... BUT I get a Foxtrot error every time I run a Powershell action with this code!? :o/

    0
    Comment actions Permalink
  • Avatar
    James Brammer

    Maybe copy/paste is messing up some characters? Strip it down to this, and also run it outside of foxtrot and see what you get with IE open, and then not open. 

    Get-Process "iexplore" | Stop-Process
    0
    Comment actions Permalink
  • Avatar
    Ghita Fjorback (Edited )

    Hi James 

    I tried and tried and tried you suggestion. I believe what you have suggested is really correct and would work, but you are right, Copy/Paste seems to change the "pipe" to another character... a "splitted pipe"... sorry, not sure what it is called. The "true pipe" symbol I can't seem to write at all in a command line inside our "citrix environment" in cmd. When I write it here outside of Citrix, I have no issue... |||||| as you can see.... 
    I can't see to test if it works, before I figure out how to enter the | in cmd inside our Citrix environment. I tried making an action in Foxtrot and have it send value to a cmd window. In the send value action, I can add the pipe fine, but the second Foxtrot sends the value to the cmd window, the pipe will the transformed to the other character "splitted pipe".... 

    Nevertheless, I solved my issue in a completely different way now. 

    Ghita

    0
    Comment actions Permalink
  • Avatar
    Tatyana Falaleeva

    Hi Ghita,

    we have a fully stable solution using the VBScript action. It finds the tab that was last opened (across windows!) and closes it. Hope it will be useful for you :)

    Here is the solution:

    'Dim the primary objects.
    Dim objApp
    Dim objIE
    Dim objWindow
    Dim objShellWindows
    
    'Set the primary objects.
    Set objApp = CreateObject("Shell.Application")
    Set objIE = Nothing
    
    'Identify the number of IE windows and connect.
    windows = 0
    For Each objWindow In objApp.Windows
      If (InStr(objWindow.Name, "Internet Explorer")) Then
        windows = windows + 1
      End If
    Next
    
    Set objIE = objApp.Windows(windows - 1)
    
    ' Work with the IE window
    With objIE
      
      .Visible = True    'Make sure to set the window of IE to visible.
      
      Do While .Busy Or .readyState <> 4
        'Do nothing, wait for the browser to load.
      Loop
      
      Do While .Document.ReadyState <> "complete"
        'Do nothing, wait for the VBScript to load the document of the website.
      Loop
      
     .Quit
      
    End With
    
    'Clear the objects.
    On Error Resume Next
    objApp = Nothing 
    objIE = Nothing
    objWindow = Nothing

     

    Only the part of finding the window is different. Instead of finding the first window, it counts the number of IE windows and connects to the last one. This is the part where this is done:

    'Identify the number of IE windows and connect.
    windows = 0
    For Each objWindow In objApp.Windows
      If (InStr(objWindow.Name, "Internet Explorer")) Then
        windows = windows + 1
      End If
    Next
    
    Set objIE = objApp.Windows(windows - 1)


    0
    Comment actions Permalink

Please sign in to leave a comment.