Help required on wait until Pageload

Rohith1324

Board Regular
Joined
Feb 27, 2018
Messages
114
Hi,

I have the below code, after the highlighted Yellow line - page almost takes 15 to 20 mins to load the data in the portal so until then I want script to wait and once the page is fully loaded then take the next actions.

Can some one please help how do i do it make the script wait until then.

bot.Start "Chrome", "??"
bot.Window.Maximize
bot.Get "??"
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/a").Click
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/table[2]/tbody/tr/td/table/tbody/tr[7]/td/form/table/tbody/tr[1]/td[2]/input").SendKeys ActiveSheet.Range("B1").Value
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/table[2]/tbody/tr/td/table/tbody/tr[7]/td/form/table/tbody/tr[2]/td[2]/input").SendKeys ActiveSheet.Range("B3").Value
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/table[2]/tbody/tr/td/table/tbody/tr[7]/td/form/table/tbody/tr[3]/td[2]/input").Click
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[1]/table/tbody/tr[2]/td/input[1]").SendKeys ActiveSheet.Range("B5").Value
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[1]/table/tbody/tr[2]/td/input[2]").Click
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/form/p/table/tbody/tr/td/table[1]/tbody/tr/td/table/tbody/tr[1]/td[2]/input[1]").Click
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/form/p/table/tbody/tr/td/table[1]/tbody/tr/td/table/tbody/tr[4]/td[2]/input").SendKeys ActiveSheet.Range("D7").Value
'bot.FindElementByXPath ("/html/body/table[4]/tbody/tr/td[2]/form/p/table/tbody/tr/td/table[2]/tbody/tr[3]/td/input")
bot.FindElementByXPath("/html/body/table[4]/tbody/tr/td[2]/form/p/table/tbody/tr/td/table[2]/tbody/tr[3]/td/input").Click
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,214,653
Messages
6,120,752
Members
448,989
Latest member
mariah3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top