标签:selenium-chromedriver
-
如何在Java项目中运行python文件? - java
我有一个python文件,该文件可以打开带有selenium的网页。如何在Java应用程序中运行此文件?我尝试了Runtime()。exec(“ python main.py”)和“ python3 main.py”,但是没有用。 参考方案 使用ProcessBuilder。 String[] commands = { "python", […]
-
在driver.execute_script()中使用伪选择器时,无法将某些元素滚动到视图中 - python
我已经使用硒创建了一个脚本来获取动态生成的文本。我必须使用硒,因此在这种情况下,我不想使用xhr。我正在尝试在硒中使用pseudo selector在其中定义explicit wait。由于硒不像pseudo selector中那样支持:contains(),因此我使用了javascript命令driver.execute_script()来达到目的。 现在 […]
-
如何获取通过部分链接文本找到的元素的href? - python
我使用Selenium和Chrome驱动程序:links = browser.find_elements_by_partial_link_text('##')匹配约160个链接。 如果我尝试 for link in links: print link.text 有了它,我得到了所有链接的文本: ##1 ##2 ... ##160 链接是这 […]
-
使用Codeception缩放页面? - php
我的问题是我必须在小屏幕上使用Codeception测试页面,以便从页面中隐藏一些元素(设计是响应式的),因此Codeception无法检测到它们。 所以我正在尝试使用Codeception进行缩小,而我已经尝试过了: $I->executeJS("$('body').css('zoom',' […]
-
未知错误:Chrome无法启动:异常退出 - python
使用chromedriver在Selenium上运行测试时出现此错误。 selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (Driver info: chromedriver=2.9. […]
-
Chromedriver 78可能存在问题,Selenium找不到在Chrome中打开的PDF的Web元素 - java
在我的Google Chrome浏览器未更新到版本78之前,我的代码无法正常工作。我还将chromedriver更新为版本78.0.3904.70。因此,我无法再使用Selenium WebDriver和Java查找id ='plugin'的WebElement: <html> <div id="content"> […]
-
使用Selenium和WebDriver(Chrome)Python OSX在Instagram中填写登录表单 - python
我想使用Selenium登录到instagram,但似乎无法在字段中输入值。 这是我的脚本: #go to this address browser.get('https://www.instagram.com') #sleep for 1 seconds sleep(1) #find the 'login' butt […]
-
Chrome v76中无法隐藏“ Chrome正在由自动化软件控制”信息栏 - c#
将Chrome更新到版本76后,我无法弄清楚如何隐藏“ Chrome正在由自动化软件控制...”通知,以覆盖页面上的某些控件。 ChromeDriver的最新稳定版确实是76.0.3809.68。以下代码适用于Chrome 75和ChromeDriver 74。 var options = new ChromeOptions(); options.AddAr […]
-
Python + Selenium:我无法从div获取打印文本 - python
Python + Selenium:我无法从此div获取打印文本: <div id="modal-content-18" class="modal-content" data-role="content"> <div> SignUp Failed. Please Try Ag […]
-
org.openqa.selenium.WebDriverException:未知错误:DevToolsActivePort文件不存在 - java
我尝试在作为节点连接到硒网格的远程PC上启动电子应用程序。以前它可以正常工作。但是现在我收到此错误“ DevToolActivePort文件不存在” System.out.println("launch application in windows PC"); capa = new DesiredCapabilities(); capa. […]