I have a company website, my job is that when logging in to the site with ID and Pass, the site will display a link, I click on that link will generate a new Web window and I will push data from excel to that new Web window. I have set my VBA Code to login and click on the link successfully but cannot push data to that generated website. What should I do, please help me! Here is the VBA code that I have generated. I want my code to work in a new web window
Sub Control_IE()
Dim obj As New WebDriver
obj.Start "Internetexplorer", ""
obj.Get "http://tms.tct.vn/irj/portal"
'Enter the ID and Pass
obj.FindElementById("logonuidfield").SendKeys ("kkktt")
obj.FindElementById("logonpassfield").SendKeys ("nopass")
obj.FindElementByName("uidPasswordLogon").Click
'Waiting
Application.Wait DateAdd("s", 1, Now)
obj.FindElementById("bestFitViews_div").Click
Application.Wait DateAdd("s", 1, Now)
'New web
'work on a new web window and push data to the new web
obj.FindElementById("WD46").SendKeys ("0105")
obj.FindElementByName("WD53").SendKeys ("2010")
obj.FindElementByName("WD87").SendKeys ("6000686830")
obj.FindElementById("WDC3-img").Click
obj.FindElementByName("WDE3").SendKeys ("22102020")
obj.FindElementByName("WDEC-img").Click
obj.FindElementByClass("urEdf2TxtEnbl lsEdfLeftBrdRadius lsEdf3TxtHlpBtn").SendKeys ("0105")
End Sub
Sub Control_IE()
Dim obj As New WebDriver
obj.Start "Internetexplorer", ""
obj.Get "http://tms.tct.vn/irj/portal"
'Enter the ID and Pass
obj.FindElementById("logonuidfield").SendKeys ("kkktt")
obj.FindElementById("logonpassfield").SendKeys ("nopass")
obj.FindElementByName("uidPasswordLogon").Click
'Waiting
Application.Wait DateAdd("s", 1, Now)
obj.FindElementById("bestFitViews_div").Click
Application.Wait DateAdd("s", 1, Now)
'New web
'work on a new web window and push data to the new web
obj.FindElementById("WD46").SendKeys ("0105")
obj.FindElementByName("WD53").SendKeys ("2010")
obj.FindElementByName("WD87").SendKeys ("6000686830")
obj.FindElementById("WDC3-img").Click
obj.FindElementByName("WDE3").SendKeys ("22102020")
obj.FindElementByName("WDEC-img").Click
obj.FindElementByClass("urEdf2TxtEnbl lsEdfLeftBrdRadius lsEdf3TxtHlpBtn").SendKeys ("0105")
End Sub