Error: E225 "DOM failed to be ready in 30sec" on selectWindow | title=*Google* after clicking Google login (WordPress)

Hi all,

I’m automating the WordPress registration process. Everything works fine until the step where I click the “Continue with Google” button. After that, I want to switch to the Google login popup window using:

{
  "Command": "selectWindow",
  "Target": "title=*Google*",
  "Value": ""
}

However, sometimes I get the error:
E225: DOM failed to be ready in 30sec.

Here’s a simplified version of my script:

{
      "Command": "open",
      "Target": "https://wordpress.com/",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "waitForPageToLoad",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "//a[contains(text(),\"Get started\")]",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "waitForPageToLoad",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "7000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "waitForElementPresent",
      "Target": "//button[@data-social-service=\"google\"]",
      "Value": "",
      "Description": ""
    },

    {
      "Command": "bringBrowserToForeground",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XClick",
      "Target": "//button[@data-social-service=\"google\"]",
      "Value": "",

      "Description": ""
    },
     { 
      "Command": "pause",
      "Target": "10000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "selectWindow",
      "Target": "title=*Google*",
      "Value": "",
      "Description": ""
    }

Please help…

it works with browser tabs not browser windows

Thanks for the answer.
What browser are you using?
How do I get to the browser tab??

you have to switch to desktop automation to manage popup

can you record video?

Oh, you mean using the ${KEY_TAB} command?
I’ve tried that, but the number of tabs is dynamic, so I often misclick.

I want to see popup window
can you record video?

I tried this on Pinterest register

, sometimes error, sometimes not.

this screenshoot in worpress register

popup is another browser window
selectWindow command won’t work
you have to temporarily switch to desktop automation mode to manage clicks in popup

and use xclick, xtype commands
xclick will do OCR click

 {
      "Command": "XDesktopAutomation",
      "Target": "true",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XClick",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XClick",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XDesktopAutomation",
      "Target": "false",
      "Value": "",
      "Description": ""
    }

if use dekstop automation, after click button continue on popup google with xclick dekstop automation, causes it not to redirect to the next page.
the button must be clicked with browser mode.

	{
      "Command": "XClick",
      "Target": "//button[@data-social-service=\"google\"]",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "10000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_TAB}${KEY_TAB}",
      "Value": "",
      "Description": "2 keytab"
    },
    {
      "Command": "XType",
      "Target": "${KEY_ENTER}",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "5000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XType",
      "Target": "${KEY_TAB}${KEY_TAB}${KEY_TAB}${KEY_TAB}${KEY_TAB}${KEY_TAB}",
      "Value": "",
      "Description": "6 keytab"
    },
    {
      "Command": "XDesktopAutomation",
      "Target": "true",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XClick",
      "Target": "google_continue.png",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "XDesktopAutomation",
      "Target": "false",
      "Value": "",
      "Description": ""
    }

you are clicking elements with keystrokes
in that case you need not switch to desktop mode

Oh, I found a bug.
An error occurred with the 2 wildcard title in selectwindow at new windows.

{
      "Command": "selectWindow",
      "Target": "title=*Google*",
      "Value": "",
      "Description": ""
    }

if use without wildcard, script run without error, example:

{
      "Command": "selectWindow",
      "Target": "title=Sign in - Google accounts",
      "Value": "",
      "Description": ""
    }

I hope there’s a fix soon. @admin

1 Like

Didn’t knew UI Vision can switch browser windows

I tested with wildcard and it works.

https://ui.vision/rpa/docs/selenium-ide/selectwindow
Document says
The selectWindow | tab=x and selectWindow | title=y commands switch between browser tabs.

Error if use 2 wildcards
example: title=*Google*
because sometimes the word ‘Google’ is in the middle of the title sentence

try with some other word