google_appengine/dev_appserver.py apprtc_code/
bool LaunchApprtcInstanceOnLocalhost() // ... Figure out locations of SDK and apprtc code ... CommandLine command_line(CommandLine::NO_PROGRAM); EXPECT_TRUE(GetPythonCommand(&command_line)); command_line.AppendArgPath(appengine_dev_appserver); command_line.AppendArgPath(apprtc_dir); command_line.AppendArg("--port=9999"); command_line.AppendArg("--admin_port=9998"); command_line.AppendArg("--skip_sdk_update_check"); VLOG(1) << "Running " << command_line.GetCommandLineString(); return base::LaunchProcess(command_line, base::LaunchOptions(), &dev_appserver_); }
bool LocalApprtcInstanceIsUp() { // Load the admin page and see if we manage to load it right. ui_test_utils::NavigateToURL(browser(), GURL("localhost:9998")); content::WebContents* tab_contents = browser()->tab_strip_model()->GetActiveWebContents(); std::string javascript = "window.domAutomationController.send(document.title)"; std::string result; if (!content::ExecuteScriptAndExtractString(tab_contents, javascript, &result)) return false; return result == kTitlePageOfAppEngineAdminPage; }
while (!LocalApprtcInstanceIsUp()) VLOG(1) << "Waiting for AppRTC to come up...";
from mozprofile import profile from mozrunner import runner WEBRTC_PREFERENCES = { 'media.navigator.permission.disabled': True, } def main(): # Set up flags, handle SIGTERM, etc # ... firefox_profile = profile.FirefoxProfile(preferences=WEBRTC_PREFERENCES) firefox_runner = runner.FirefoxRunner( profile=firefox_profile, binary=options.binary, cmdargs=[options.webpage]) firefox_runner.start()
GURL room_url = GURL(base::StringPrintf("http://localhost:9999?r=room_%d", base::RandInt(0, 65536))); content::WebContents* chrome_tab = OpenPageAndAcceptUserMedia(room_url); ASSERT_TRUE(LaunchFirefoxWithUrl(room_url));
run_firefox_webrtc.py --binary /path/to/firefox --webpage http://localhost::9999?r=my_room
<div class="button">Save</div>
<div class="button">Edit</div>
div.button
//div[@class='button' and text()='Save']
contact-form.save-button contact-form.edit-button
@Override protected void onEnsureDebugId(String baseId) { super.onEnsureDebugId(baseId); saveButton.ensureDebugId(baseId + ".save-button"); editButton.ensureDebugId(baseId + ".edit-button"); }
<tr id="feedback-{{$index}}" class="feedback" ng-repeat="feedback in ctrl.feedbacks" >
@UiField FlexTable table; UIObject.ensureDebugId(table.getCellFormatter().getElement(rowIndex, columnIndex), baseID + colIndex + "-" + rowIndex);