Hi I am using ghostdriver for selenium. I am trying to log into google adwords but for some reason I am having extreme issues.
Here is my code:
Dim driver As New PhantomJSDriver
Dim options = New PhantomJSOptions()
options.AddAdditionalCapability("phantomjs.page.settings.userAgent", "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36")
driver.Navigate.GoToUrl("https://accounts.google.com/ServiceLogin?service=adwords&continue=https://adwords.google.com/um/identity?dst%3D/ko/KeywordPlanner/Home&hl=en_US<mpl=signin&passive=0&skipvpage=true#identifier")
driver.Manage.Window.Maximize()
Dim i As IWebElement = driver.FindElementByName("Email")
Dim a As New Actions(driver)
a.MoveToElement(i).Click().Perform()
Dim jse As IJavaScriptExecutor = DirectCast(driver, IJavaScriptExecutor)
jse.ExecuteScript("document.getElementById('Email').focus();")
Dim nextbtn As IWebElement = driver.FindElementById("link-signup")
nextbtn.Click()
Try
Dim ss As Screenshot = DirectCast(driver, ITakesScreenshot).GetScreenshot()
ss.SaveAsFile("D:\SeleniumTestingScreenshot.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)
Catch
End Try
As you can see it's a very straightforward process. The issue is that everything is grayed out on the page (I have checked via screenshot). It's as if something isn't properly loading on the page and causing the textbox or buttons or links to become active. I cannot click on ANYTHING. I have tried many different things but nothing is working for me. Javascript is enabled, I have changed the user agent in case the phantomjs one is being blocked. Any help to this issue would be appreciated. I can work with c# or vb.net it doesn't matter. I have a feeling Google is being tricky here.