我遇到了以下问题:当我运行自动化测试时,我在Chrome中不断收到以下警告"禁用开发人员模式扩展".

有没有办法删除/禁用此功能?这对我来说是一个阻碍因为它让我失败了一些测试.
提前致谢
我下载了ChromeDriver,默认情况下浏览器语言是英文的,我需要将其更改为西班牙语,我一直无法使用.
public WebDriver getDriver(String locale){
System.setProperty("webdriver.chrome.driver", "driver/chromedriver.exe");
return new ChromeDriver();
}
public void initializeSelenium() throws Exception{
driver = getDriver("en-us")
}
Run Code Online (Sandbox Code Playgroud) 我有以下问题.我有一个隐藏的下拉列表,所以当我进行选择并运行测试时,我得到以下错误:
org.openqa.selenium.ElementNotVisibleException: element not visible: Element is not currently visible and may not be manipulated
(Session info: chrome=30.0.1599.101)
Run Code Online (Sandbox Code Playgroud)
这是我的选择:
Select s = new Select(dropDown);
s.selectByVisibleText("CHARGEBACK");
Run Code Online (Sandbox Code Playgroud)
是否有一个漫步来操纵隐藏的元素?我在其中一篇帖子中找到了以下代码:
JavascriptExecutor jse = (JavascriptExecutor) driver;
jse.executeScript("arguments[0].scrollIntoView(true);", element);
Run Code Online (Sandbox Code Playgroud)
这是html代码:
<div class="ui-helper-hidden">
<select id="formLevel:levels_input" name="formLevel:levels_input">
<option value="541fac58-5ea8-44ef-9664-e7e48b6c6a3c">Seleccione un Registro</option>
<option value="dafc799c-4d5e-4b02-a882-74cb6ad98902">SECURITY</option>
<option value="e5416086-2036-4cd0-b23e-865747aa3f53">CALL CENTER</option>
<option value="7ea4b4ea-4f06-4d27-9541-1b0cf3f2aa22">CHARGEBACK</option>
<option value="0f915120-7b8f-4a33-b063-5d20a834b655">PREVENÇÃO A FRAUDE</option>
<option value="a8ef13e8-f4a5-43b8-a668-b769f6988565">ANALISE DE CREDITO</option>
<option value="83b65a26-d4cd-43d3-b3fa-2f7894ca454a">SUPORTE A CONTA</option>
<option value="163d0db9-590c-47a7-a271-218b2d27d8d9">REGULARIZAÇÃO FINANCEIRA</option>
Run Code Online (Sandbox Code Playgroud)
它在这种情况下不起作用.任何帮助,将不胜感激.
我正在自动化一个网页,在一个类中我有几个测试,当我通过testng运行它们所有的@Aftertest都没有被调用,所以唯一有效的测试是第一个,因为当第一个测试完成,它不会调用后来关闭驱动程序实例并开始一个新的.有我的方法:
@BeforeSuite
public void printInfo() {
Utilidades.addInformationTest();
}
@BeforeTest
public void loggerUser() throws Exception {
initializeSelenium("VerificacionUI_FraudMonitor_Issuer");
Utilidades.printInfo("Cargando datos de variables.");
setCMSModulo(modulo);
setUsuario(usuario);
setContraseña(contraseña);
startAccess();
parentWindowHandle = driver.getWindowHandle();
}
@AfterTest
public void shutDownSelenium() {
driver.quit();
}
Run Code Online (Sandbox Code Playgroud)
然后来我的所有六个@Test
如果有任何可以告诉我我做错了什么,因为我一无所知.我没有每个测试单独工作,因为我已经尝试过.
谢谢.
我正在使用 Spring Boot 将表映射到 POJO,但出现以下错误:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [com/mercadolibre/linters/db/config/DbaConfig.class]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.tool.schema.spi.SchemaManagementException: Schema-validation: wrong column type encountered in column [linter_summary] in table [result]; found [json (Types#CHAR)], but expecting [varchar(255) (Types#VARCHAR)]
Run Code Online (Sandbox Code Playgroud)
linter_summarydb 中的字段是 JSON 类型,在我的 pojo 上是一个字符串。我不明白为什么会出现此错误,Java 中是否有用于 JSON 字段的特殊变量?
我有以下问题.我正在使用Java属性来读取文件的一些信息,但是当我调用prop.getProperty("var")它时返回null.我没有想法了.这是我的代码.
static final Properties prop = new Properties();
public JConnection(){
try{
prop.load(new FileInputStream("db.properties"));
}catch(Exception e){
logger.info("file not found.");
e.printStackTrace();
}
}
Run Code Online (Sandbox Code Playgroud)
我从来没有收到错误消息"找不到文件".
public static Connection getConnection(String conType) {
Connection conn;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
if(model == "client"){
conn = DriverManager.getConnection(prop.getProperty("url"),prop.getProperty("usr"),prop.getProperty("pass"));
}else{
conn = DriverManager.getConnection(prop.getProperty("url1"),prop.getProperty("usr1"),prop.getProperty("pass1"));
}
} catch (Exception ex) {
ex.printStackTrace();
conn = null;
}
Run Code Online (Sandbox Code Playgroud)
当它尝试连接到数据库时,getProperty正在返回,null因为找不到它.任何想法可能是什么或我做错了什么?
I\xc2\xb4m 在使用 Cucumber 和 Nightwatch.js 时遇到问题。在我的一个功能中,第一步我发出 POST 请求来获取 ID,然后将该 ID 使用到我需要导航的 URL 中。我遇到的问题是,当我在另一步骤中得到响应时,我\xc2\xb4m ,因此测试失败,因为项目 i\xc2\xb4m 试图查看它不在\xc2\xb4t 那里。这是我正在采取的步骤的一个片段。
\n\n Given(/^I make a post request and retreive the Id i got the page + id$/, () => {\n //I make the post request \n var transactionIdPromise = utils.getTransactionId(1);\n var url = "";\n\n transactionIdPromise.getBody(\'utf8\').then(JSON.parse).done(function (result) {\n var id = result.transaction_id;\n url = "https://mywebpage.com:8443/" + id;\n return client.url(url)\n });\n});\n\n//request that returns id\nvar getTransactionId = function (user) {\n return request(\'POST\', \'http://localhost:8888/internal/retreive_transaction/?\', {json: {user_id: user, type: …Run Code Online (Sandbox Code Playgroud) 我正在使用 SNS / SQS 在 AWS 上工作,并且尝试在 SQS 主题上创建 SNS 订阅。我正在使用 AWS Java SDK 2。我可以正确创建主题和队列,我面临的问题是在主题和队列之间创建订阅时出现错误。下面是我的代码片段:
public SubscribeResponse subscribeQueue(String topicArn, String queueUrl){
SubscribeRequest subscribeRequest = SubscribeRequest.builder()
.topicArn(topicArn)
.protocol("sqs")
.endpoint(queueUrl)
.returnSubscriptionArn(true).build();
return getAmazonSNSClient().subscribe(subscribeRequest);
}
Run Code Online (Sandbox Code Playgroud)
以下是我收到的错误:
{ "message": "Internal Server Error: software.amazon.awssdk.services.sns.model.InvalidParameterException: Invalid parameter: SQS endpoint ARN (Service: Sns, Status Code: 400, Request ID: dabaeeb3-e77a-5873-861e-b8d0a7bf5c7f)" }
Run Code Online (Sandbox Code Playgroud)
有人能指出我做错了什么吗?
尝试在测试运行后连接到我的testlink服务器时出现以下错误:
br.eti.kinoshita.testlinkjavaapi.util.TestLinkAPIException:验证开发人员密钥时出错:无法读取服务器的响应:http
这是我用来创建testlink连接的字符串:
http://usrname:test@http://{ip_server}/testlink/lib/api/xmlrpc/v1/xmlrpc.php
任何人都可以知道我做错了什么
当我尝试访问具有"."键的数据时,我遇到以下问题.
data: {
car.model: "Mercedez",
car.color: "Blue"
}
//Javascript
var model = result.data.car.model;
var model = result.data.'car.model';
Run Code Online (Sandbox Code Playgroud)
我收到以下错误:
"未捕获的TypeError:无法读取未定义的属性'模型'"
有没有办法可以阅读car.model和car.color?
我如何才能转义以下特殊字符,以便可以使用div上的ID来获取表格?这是我的cssSelector:
#form > div:nth-child(4)>div:nth-child(2) > div:nth-of-type(2) > div:nth-of-type(2)
Run Code Online (Sandbox Code Playgroud)
这是html代码:
div id="form:panelGridTransactionInfo" class="ui-panel ui-widget ui-widget-content ui-corner-all"
Run Code Online (Sandbox Code Playgroud)
谢谢
java ×7
selenium ×4
webdriver ×3
amazon-sns ×1
amazon-sqs ×1
cucumber ×1
hibernate ×1
javascript ×1
json ×1
mysql ×1
node.js ×1
spring-boot ×1
testlink ×1
testng ×1