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
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