browser-automation

Internet explorer automation busy v/s readystate property

好久不见. 提交于 2019-11-28 11:43:37
I am new to vbscript and while reading i found some code as Do While ie.busy stateString = stateString & " " & cstr(ie.readystate) loop do while ie.readystate <> 4 stateString = stateString & " " & ie.readystate loop so could anyone please let me know what is difference between the busy property and readystate property. From here : Michael Harris (MVP) wrote: [...] do until ie.readyState = 4 : wscript.sleep 10 : loop [...] Is there a reason to use do until ie.readyState = 4 : wscript.sleep 10 : loop instead of While ie.Busy : WScript.Sleep 10: Wend [...] Just based on past experience in lots

Check if “Please enter an email address” message appears

不羁的心 提交于 2019-11-27 21:22:46
问题 Given a simple page: <form> <input type="email"> <button>click</button> </form> If I enter anything in text field that is not e-mail and click the button, Please enter an email address message appears. Is there a way to to check if the message appears using Selenium or Watir? As far as I see, nothing new appears in browser DOM. Since the page is using e-mail check that is built in feature of a browser, does it even make sense to check that error message appears? It is at the same level as

Selenium - NoSuchWindowException in IE 11

纵饮孤独 提交于 2019-11-27 20:33:12
I am trying to automate a webpage using selenium in IE11. I have set the protected mode settings to same level and zoom level is 100%. While running the test it opens the website however gives the exception just after. Below is the code used. File file = new File("C:\\Users\\Desktop\\IEDriverServer.exe"); System.setProperty("webdriver.ie.driver", file.getAbsolutePath() ); DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer(); capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS, true); WebDriver driver = new

How to automate browsing using python? [closed]

六月ゝ 毕业季﹏ 提交于 2019-11-27 11:35:18
suppose, I need to perform a set of procedure on a particular website say, fill some forms, click submit button, send the data back to server, receive the response, again do something based on the response and send the data back to the server of the website. I know there is a webbrowser module in python, but I want to do this without invoking any web browser. It hast to be a pure script. Is there a module available in python, which can help me do that? thanks You can also take a look at mechanize . Its meant to handle "stateful programmatic web browsing" (as per their site). selenium will do

How to use/attach an existing browser using Selenium?

喜你入骨 提交于 2019-11-27 08:56:35
What is the Selenium equivalent to attaching an existing browser in Watir? brw = Watir::IE.attach(:title, "Google") This is a duplicate answer **Reconnect to a driver in python selenium ** This is applicable on all drivers. 1. open a driver driver = webdriver.Firefox() 2. extract to session_id and _url from driver object. url = driver.command_executor._url #"http://127.0.0.1:60622/hub" session_id = driver.session_id #'4e167f26-dc1d-4f51-a207-f761eaf73c31' 3. Use these two parameter to connect to your driver. driver = webdriver.Remote(command_executor=url,desired_capabilities={}) driver.session

IE 9 not accepting SendKeys

倖福魔咒の 提交于 2019-11-27 07:17:32
问题 I posted on IE 9 not accepting SendKeys to download a file, but this problem is separate enough from the answer I received to justify another question. My problem is that I can't get IE 9 to accept any of the SendKeys . I have attempted Page Down , Tab , all of the F# keys, and none of them work. Here is the code I am using: Dim ie As Object 'This creates the IE object Sub initializeIE() 'call this subprocedure to start internet explorer up Set ie = CreateObject("internetexplorer.application"

Workaround for Python & Selenium: authenticate against Active Directory

若如初见. 提交于 2019-11-27 07:04:54
问题 I am using Python (2.7) and Selenium (3.4.3) to drive Firefox (52.2.0 ESR) via geckodriver (0.19.0) to automate a process on a CentOS 7 machine. I need totally unattended operation of this automation with user credentials passed through; no storage allowed and no breaking in. One piece of drama is being caused by the fact that the internal website required for the process is within an Active Directory domain while the machine running my automation is not. I have no need to validate the user,

Selenium - NoSuchWindowException in IE 11

一世执手 提交于 2019-11-27 04:25:54
问题 I am trying to automate a webpage using selenium in IE11. I have set the protected mode settings to same level and zoom level is 100%. While running the test it opens the website however gives the exception just after. Below is the code used. File file = new File("C:\\Users\\Desktop\\IEDriverServer.exe"); System.setProperty("webdriver.ie.driver", file.getAbsolutePath() ); DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer(); capabilities.setCapability

How to automate browsing using python? [closed]

僤鯓⒐⒋嵵緔 提交于 2019-11-26 15:38:13
问题 suppose, I need to perform a set of procedure on a particular website say, fill some forms, click submit button, send the data back to server, receive the response, again do something based on the response and send the data back to the server of the website. I know there is a webbrowser module in python, but I want to do this without invoking any web browser. It hast to be a pure script. Is there a module available in python, which can help me do that? thanks 回答1: You can also take a look at

How to use/attach an existing browser using Selenium?

时光怂恿深爱的人放手 提交于 2019-11-26 11:18:11
问题 What is the Selenium equivalent to attaching an existing browser in Watir? brw = Watir::IE.attach(:title, \"Google\") 回答1: This is a duplicate answer **Reconnect to a driver in python selenium ** This is applicable on all drivers. 1. open a driver driver = webdriver.Firefox() 2. extract to session_id and _url from driver object. url = driver.command_executor._url #"http://127.0.0.1:60622/hub" session_id = driver.session_id #'4e167f26-dc1d-4f51-a207-f761eaf73c31' 3. Use these two parameter to