addons怎样搜Java_java – Xlib:扩展名“RANDR”缺少显示“:99”

因为这个问题感到非常失望!当我运行我的测试类时,它显示错误

Testsuite: com.lo.test.selenium.AssignCampaignTestCase

Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 46.991 sec

------------- Standard Error -----------------

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:

Xlib: extension "RANDR" missing on display ":99".

*** LOG addons.manager: Application has been upgraded

*** LOG addons.xpi: startup

*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous4942696774897131989webdriver-profile/extensions/webdriver-staging

*** LOG addons.xpi: checkForChanges

*** LOG addons.xpi-utils: Opening database

*** LOG addons.xpi-utils: Creating database schema

*** LOG addons.xpi: New add-on fxdriver@googlecode.com installed in app-profile

*** LOG addons.xpi: New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global

*** LOG addons.xpi: Updating database with changes to installed add-ons

*** LOG addons.xpi-utils: Updating add-on states

*** LOG addons.xpi-utils: Writing add-ons list

*** LOG addons.manager: shutdown

*** LOG addons.xpi: shutdown

*** LOG addons.xpi-utils: shutdown

*** LOG addons.xpi-utils: Database closed

Xlib: extension "RANDR" missing on display ":99".

*** LOG addons.xpi: startup

*** LOG addons.xpi: Ignoring file entry whose name is not a valid add-on ID: /tmp/anonymous4942696774897131989webdriver-profile/extensions/webdriver-staging

*** LOG addons.xpi: checkForChanges

*** LOG addons.xpi: No changes found

at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:109)

at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:245)

at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:109)

我的考试班

package com.lo.test.selenium;

import static org.junit.Assert.assertTrue;

import static org.junit.Assert.fail;

import java.util.Properties;

import java.util.ResourceBundle;

import javax.mail.Flags;

import javax.mail.Folder;

import javax.mail.Message;

import javax.mail.MessagingException;

import javax.mail.NoSuchProviderException;

import javax.mail.Session;

import javax.mail.Store;

import org.junit.Test;

import org.openqa.selenium.By;

import org.openqa.selenium.WebDriver;

import org.openqa.selenium.WebElement;

import org.openqa.selenium.firefox.FirefoxDriver;

import org.openqa.selenium.support.ui.ExpectedConditions;

import org.openqa.selenium.support.ui.Select;

import org.openqa.selenium.support.ui.WebDriverWait;

public class MyExampleTestCase {

private static ResourceBundle rb = ResourceBundle.getBundle("global-messages");

static WebDriver driver = new FirefoxDriver(); //Make it static in order to make one

instance of this class(helps to avoid opening of 2 browsers at once)

@Test

public void campaignEmailTestCase() throws InterruptedException {

MyExampleTestCase emTesObj=new MyExampleTestCase ();

String fName="test LO";

Integer LeadId=570903;

String campaignName="2Get";

String SubjName="Welcome"; //NOTE: No problem,Type without

double quotes. It will work for you

emTesObj.doLogin();

emTesObj.goToLeadsListPage();

emTesObj.searchByFirstName(fName);//without this also,it will work but Gives you the correct

navigation on UI

emTesObj.waitBeforePageLoads(LeadId.toString()); //pass the Id attribute which you aspect to

see after the page is loaded

emTesObj.assignCampaign(LeadId, campaignName);

emTesObj.readRecentEmail(SubjName);

}

**Update**

我尝试了下面的代码,但在执行此代码后仍显示相同的错误

Xvfb :21 -screen 0 1024x768x24 -extension RANDR &

看起来这段代码运行不正常.请有人帮帮我

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值