I'm not getting mobile UI screen - automated-tests

This is my code.
Appium version is 2.0
caps = {}
caps["platformName"] = "Android"
caps["appium:platform Version"] = "7.1.1"
caps["appium:deviceName"] = "Pixel Pro 6"
caps["appium:appPackage"] = "com.android.chrome"
caps["appium:appActivity"] = "com.google.android.apps.chrome.Main"
caps["appium:udid"] = "emulator-5554"
caps["appium:ensure WebviewsHavePages"] = True
caps["appium:native Web Screenshot"] = True
caps["appium:newCommandTimeout"] = 3600
caps["appium:connect Hardware Keyboard"] = True
driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", caps)
driver.implicitly_wait(5)
driver.find_element(By.ID, 'com.android.chrome:id/terms_accept').click()
UI screen are not showing on screen.

Related

Is it possible to make tasklist automatically switch to different layout?

I am using the following code for my wibar tasklist:
s.mytasklist = awful.widget.tasklist
{
screen = s,
filter = awful.widget.tasklist.filter.allscreen,
buttons = tasklist_buttons,
layout = wibox.layout.fixed.horizontal(),
widget_template =
{
{
{
{
id = 'clienticon',
widget = awful.widget.clienticon,
},
margins = 0,
widget = wibox.container.margin,
},
{
id = 'text_role',
widget = wibox.widget.textbox,
},
layout = wibox.layout.fixed.horizontal,
},
id = 'background_role',
forced_width = 200,
forced_height = 60,
widget = wibox.container.background,
create_callback = function(self, c, index, objects)
self:get_children_by_id('clienticon')[1].client = c
end,
},
}
s.mytasklist_onlyminimised = awful.widget.tasklist
{
screen = s,
filter = awful.widget.tasklist.filter.minimizedcurrenttags,
buttons = tasklist_buttons,
style = {
shape_border_width = 1,
shape_border_color = '#333333',
shape = gears.shape.partially_rounded_rect,
},
}
Which makes the tasks on the tasklist have fixed width (as according to this answer)
My question is:
Is it possible to make the tasklist switch to wibox.layout.flex.horizontal when the tasklist is full of tasks?
While you could technically replace the tasklist from a client.connect_signal("tagged", function(c) if #c.screen.selected_tag:clients() >= some_number then <make_a_new_tasklist> end end) style code, that's pretty cheap and ugly.
So I think this would require to contribute a patch upstream to expose the taglist/tasklist constructor arguments as properties. The awful.widget.layoutlist already do it, but not the tag/tasklists.

Can't set separate Siri shortcut phrase through INUIAddVoiceShortcutButton if there are two buttons in a single view

I am unable to set separate Siri shortcut phrases through INUIAddVoiceShortcutButton if there are two buttons in a single view. As soon as I record phrase for one button the other button gets changed to edit mode along with first button. How can I resolve that issue?
Screen before recording phrase
Screen after recording phrase
func firstShortcut() {
let activity1 = NSUserActivity(activityType: "com.test.first")
activity1.title = "Log first activity"
activity1.isEligibleForSearch = true
activity1.suggestedInvocationPhrase = "Log my first activity"
activity1.isEligibleForPrediction = true
activity1.persistentIdentifier = "com.test.first"
view.userActivity = activity1
activity1.becomeCurrent()
let addShortcutButton = INUIAddVoiceShortcutButton(style: .whiteOutline)
addShortcutButton.shortcut = INShortcut(userActivity: activity1)
addShortcutButton.delegate = self
addShortcutButton.translatesAutoresizingMaskIntoConstraints = false
addSiriShortcutView1.addSubview(addShortcutButton)
addSiriShortcutView1.centerXAnchor.constraint(equalTo: addShortcutButton.centerXAnchor).isActive = true
addSiriShortcutView1.centerYAnchor.constraint(equalTo: addShortcutButton.centerYAnchor).isActive = true
}
func secondShortcut() {
let activity2 = NSUserActivity(activityType: "com.test.second")
activity2.title = "Log second activity"
activity2.isEligibleForSearch = true
activity2.suggestedInvocationPhrase = "Log my second activity"
activity2.isEligibleForPrediction = true
activity2.persistentIdentifier = "com.test.second"
view.userActivity = activity2
activity2.becomeCurrent()
let addShortcutButton = INUIAddVoiceShortcutButton(style: .whiteOutline)
addShortcutButton.shortcut = INShortcut(userActivity: activity2)
addShortcutButton.delegate = self
addShortcutButton.translatesAutoresizingMaskIntoConstraints = false
addSiriShortcutView2.addSubview(addShortcutButton)
addSiriShortcutView2.centerXAnchor.constraint(equalTo: addShortcutButton.centerXAnchor).isActive = true
addSiriShortcutView2.centerYAnchor.constraint(equalTo: addShortcutButton.centerYAnchor).isActive = true
}

Gstreamer Pause/Resume pipeline issue

I am using qt-gstreamer 1.2 with gstreamer 1.2.4 on nVidia TX1 running Ubuntu 14.04.
I am having a pipeline with camera preview + recording + Ethernet Streaming + Wifi Streaming and i want to make pipeline dynamic. ex i can add/remove recording/Streaming on running pipeline.
I pause pipeline to add/remove elements and then resume without using pads and its blocking capabilities. This works fine. But pipeline hangs after several add/remove of elements. and it hangs when i paused the pipeline.
I found that its Pause/Resume which hangs pipeline not Linking/Unlinking elements on pause.
If i add less elements in pipeline like only adding elements required for preview and recording then pipeline hangs after long time then with all elements.
All sink element sync and async are false.
m_pipeline = QGst::Pipeline::create();
m_source = QGst::ElementFactory::make("v4l2src", "v4l2src");
m_filter1 = QGst::ElementFactory::make("capsfilter", "capsfilter");
m_convert = QGst::ElementFactory::make("nvvidconv", "videoconvert");
m_filter2 = QGst::ElementFactory::make("capsfilter", "capsfilter1");
m_filter3 = QGst::ElementFactory::make("capsfilter", "capsfilter2");
m_tee = QGst::ElementFactory::make("tee", "tee");
m_tee1 = QGst::ElementFactory::make("tee", "tee1");
m_enc = QGst::ElementFactory::make("omxh264enc", "omxh264enc");
m_enc1 = QGst::ElementFactory::make("omxh264enc", "omxh264enc1");
m_parse = QGst::ElementFactory::make("h264parse", "h264parse");
m_parse1 = QGst::ElementFactory::make("h264parse", "h264parse1");
m_parse2 = QGst::ElementFactory::make("h264parse", "h264parse2");
m_mux = QGst::ElementFactory::make("qtmux", "qtmux");
m_filesink = QGst::ElementFactory::make("filesink", "filesink");
m_queue1 = QGst::ElementFactory::make("queue", "queue1");
m_queue2 = QGst::ElementFactory::make("queue", "queue2");
m_queue3 = QGst::ElementFactory::make("queue", "queue3");
m_queue4 = QGst::ElementFactory::make("queue", "queue4");
m_queue5 = QGst::ElementFactory::make("queue", "queue5");
m_queue6 = QGst::ElementFactory::make("queue", "queue6");
m_queue7 = QGst::ElementFactory::make("queue", "queue7");
m_queue8 = QGst::ElementFactory::make("queue", "queue8");
m_fakesink = QGst::ElementFactory::make("fakesink", "fakesink");
m_rtppay1 = QGst::ElementFactory::make("rtph264pay", "rtph264pay");
m_rtppay2 = QGst::ElementFactory::make("rtph264pay", "rtph264pay1");
m_udpsink = QGst::ElementFactory::make("udpsink", "udpsink");
m_udpsink1 = QGst::ElementFactory::make("udpsink", "udpsink1");
m_videoSink = QGst::ElementFactory::make("nvoverlaysink", "sink");
m_tee2 = QGst::ElementFactory::make("tee", "tee3");
m_fakesink1 = QGst::ElementFactory::make("fakesink", "fakesink1");
m_mux1 = QGst::ElementFactory::make("qtmux", "qtmux1");
m_filesink1 = QGst::ElementFactory::make("filesink", "filesink1");
m_filter1->setProperty("caps", QGst::Caps::fromString("video/x-raw, width=1920, height=1080, format=UYVY, framerate=60/1"));
m_filter2->setProperty("caps", QGst::Caps::fromString("video/x-raw(memory:NVMM), width=1920, height=1080, format=I420, framerate=60/1"));
m_filter3->setProperty("caps", QGst::Caps::fromString("video/x-h264, stream-format=(string)byte-stream"));
m_videoSink->setProperty("sync", false);
m_videoSink->setProperty("async", false);
m_pipeline->setProperty("video-sink", m_videoSink);
m_filesink->setProperty("sync", false);
m_filesink->setProperty("async", false);
m_enc->setProperty("bitrate", 19000000);
m_enc->setProperty("low-latency", 1);
m_enc->setProperty("control-rate", 2);
m_filesink->setProperty("location", "/home/ubuntu/video.mp4");
m_rtppay1->setProperty("mtu", 1400);
m_rtppay2->setProperty("mtu", 1400);
m_filesink1->setProperty("sync", false);
m_filesink1->setProperty("async", false);
m_filesink1->setProperty("location", "/home/ubuntu/video1.mp4");
m_udpsink->setProperty("port", 5000);
m_udpsink->setProperty("sync", false);
m_udpsink->setProperty("async", false);
m_udpsink->setProperty("host", "127.0.0.1");
m_udpsink1->setProperty("port", 8554);
m_udpsink1->setProperty("sync", false);
m_udpsink1->setProperty("async", false);
m_udpsink1->setProperty("host", "172.10.10.135");
m_pipeline->add(m_source, m_filter1, m_tee2, m_queue6, m_fakesink1);
m_pipeline->add(m_queue7, m_convert, m_filter2, m_tee, m_queue1, m_videoSink);
m_pipeline->add(m_queue2, m_enc, m_filter3, m_tee1, m_queue8, m_fakesink);
m_pipeline->add(m_queue3, m_parse, m_mux, m_filesink);
m_pipeline->add(m_queue4, m_parse1, m_rtppay1, m_udpsink);
m_pipeline->add(m_queue5, m_parse2, m_rtppay2, m_udpsink1);
m_pipeline->linkMany(m_source, m_filter1, m_tee2, m_queue6, m_fakesink1);
m_pipeline->linkMany(m_tee2, m_queue7, m_convert, m_filter2, m_tee, m_queue1, m_videoSink);
m_pipeline->linkMany(m_tee, m_queue2, m_enc, m_filter3, m_tee1, m_queue8, m_fakesink);
m_pipeline->linkMany(m_tee1, m_queue3, m_parse, m_mux, m_filesink);
m_pipeline->linkMany(m_tee1, m_queue4, m_parse1, m_rtppay1, m_udpsink);
m_pipeline->linkMany(m_tee1, m_queue5, m_parse2, m_rtppay2, m_udpsink1);
for testing i am pause and play pipeline every 1 sec.
m_pipeline->setState(QGst::StatePaused);
QThread::msleep(10);
m_pipeline->setState(QGst::StatePlaying);
The pipeline hangs after several Pause/Resume.
If i remove last 2 lines of linkmany and add the i can pause/resume more times than with all elements added.
So whats the problem here?
How can i pause / play pipeline efficiently?

Problems with TCP in VACaMobil

I am having some problems with TCP in VACaMobil.
I am using two TCP modules built up in Inet: TCPBasicClientApp and TCPEchoApp.
The former works as a client and the former works as a server.
The number of cars (the module name is "coche") in the simulation is 100, and there are five concurrent transmissions:
CLIENT SERVER
Car 0 --> Car 99
Car 1 --> Car 98
Car 2 --> Car 97
Car 3 --> Car 96
Car 4 --> Car 95
I am also using three routing protocols: AODV, DYMO and OLSR.
However, regardless of the configuration that I run, errors like this ocurr in the simulation:
Error in module (TCPBasicClientApp) Highway.coche[*].tcpApp[0] (id = 35) at event #49519, t = 166: IPvXAddressResolver: module 'coche[98]' not found.
In this case, using AODV, the car 1 cannot communicate with the car 98. I learned that VACaMobil, after a time, deletes some cars while it is creating others beyond 100,
such as "coche[110]", "coche[115]", etc.
I don't understand why it keeps deleting and creating nodes; I thought that VACaMobil really generated a constant number of vehicles.
How can I fix this? Any help is appreciated.
Here is the omnetpp.ini:
[General]
network = Highway
debug-on-errors = false
cmdenv-express-mode = true
cmdenv-autoflush = true
cmdenv-status-frequency = 10000000s
#repeat = 10
tkenv-plugin-path = ../../../etc/plugins
tkenv-image-path = bitmaps
check-signals = true
**.manager.**.scalar-recording = true
**.manager.**.vector-recording = true
**.manetrouting.**.scalar-recording = true
**.movStats.**.scalar-recording = true
**.movStats.**.vector-recording = true
**.mac.**.scalar-recording = true
**.mac.**.vector-recording = true
**.scalar-recording = true
**.vector-recording = true
#ChannelControl
*.channelControl.carrierFrequency = 2.4GHz
*.channelControl.pMax = 2mW
*.channelControl.sat = -110dBm
*.channelControl.alpha = 2
*.channelControl.numChannels = 1
# TraCIScenarioManagerLaunchd
*.manager.updateInterval = 1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.moduleType = "rcdp9.TAdhocHost"
*.manager.moduleName = "coche"
*.manager.moduleDisplayString = ""
*.manager.autoShutdown = true
*.manager.margin = 25
*.manager.warmUpSeconds = 0
*.manager.launchConfig = xmldoc("VACaMobil/Milan/downtown.launch.xml")
*.manager.getStatistics = true
*.manager.statFiles = "${resultdir}/${configname}-${runnumber}-"
# nic settings
**.wlan[*].bitrate = 24Mbps
**.wlan[*].opMode = "g"
**.wlan[*].mgmt.frameCapacity = 10
**.wlan[*].mgmtType = "Ieee80211MgmtAdhoc"
**.wlan[*].mac.basicBitrate = 24Mbps
**.wlan[*].mac.controlBitrate = 24Mbps
**.wlan[*].mac.address = "auto"
**.wlan[*].mac.maxQueueSize = 14
**.wlan[*].mac.rtsThresholdBytes = 3000B
**.wlan[*].mac.retryLimit = 7
**.wlan[*].mac.cwMinData = 7
**.wlan[*].radio.transmitterPower = 2mW
**.wlan[*].radio.thermalNoise = -110dBm
**.wlan[*].radio.sensitivity = -85dBm
**.wlan[*].radio.pathLossAlpha = 2
**.wlan[*].radio.snirThreshold = 4dB
**.channelNumber = 0
**.coche.networkLayer.configurator.networkConfiguratorModule = "configurator"
# manet routing
**.routingProtocol = ${"AODVUU", "DYMO", "OLSR"}
**.tcpAlgorithmClass = "TCPNewReno"
**.coche[0..4].numTcpApps = 1
**.coche[0..4].tcpApp[*].typename = "TCPBasicClientApp"
**.coche[0..4].tcpApp[*].localPort = -1
**.coche[0..4].tcpApp[*].connectPort = 1000
**.coche[0..4].tcpApp[*].dataTransferMode = "bytecount"
**.coche[0..4].tcpApp[*].startTime = 10s
**.coche[0..4].tcpApp[*].thinkTime = 1s
**.coche[0..4].tcpApp[*].idleInterval = 3s
**.coche[0..4].tcpApp[*].requestLength = 5000000B
**.coche[5..94].numTcpApps = 0
**.coche[95..99].numTcpApps = 1
**.coche[95..99].tcpApp[*].typename = "TCPEchoApp"
**.coche[95..99].tcpApp[*].localPort = 1000
**.coche[95..99].tcpApp[*].dataTransferMode = "bytecount"
**.coche[0].tcpApp[*].connectAddress = "coche[99]"
**.coche[1].tcpApp[*].connectAddress = "coche[98]"
**.coche[2].tcpApp[*].connectAddress = "coche[97]"
**.coche[3].tcpApp[*].connectAddress = "coche[96]"
**.coche[4].tcpApp[*].connectAddress = "coche[95]"
**.meanNumberOfCars = 100
**.autoShutdown = false
Here is TAdhocHost.ned:
package rcdp9;
import inet.networklayer.IManetRouting;
import inet.networklayer.autorouting.ipv4.HostAutoConfigurator2;
import inet.nodes.inet.AdhocHost;
module TAdhocHost extends AdhocHost
{
parameters:
#display("i=device/cellphone");
mobilityType = default("TraCIMobility");
IPForward = true;
submodules:
ac_wlan: HostAutoConfigurator2 {
#display("p=127,240");
}
connections:
}
Here is Highway.ned:
package rcdp9;
import inet.world.VACaMobil.VACaMobil;
import inet.networklayer.autorouting.ipv4.IPv4NetworkConfigurator;
import inet.networklayer.autorouting.ipv4.HostAutoConfigurator;
import inet.nodes.inet.AdhocHost;
import inet.world.radio.ChannelControl;
import inet.world.traci.TraCIScenarioManagerLaunchd;
network Highway
{
submodules:
configurator: IPv4NetworkConfigurator {
#display("p=396,221");
}
channelControl: ChannelControl {
#display("p=396,310");
}
manager: VACaMobil {
#display("p=322,405");
}
connections allowunconnected:
}
From what I understand, VACaMobil is built on Veins.
Veins creates a new network node for every vehicle that starts driving. When the corresponding vehicle stops driving (having arrived at its destination) Veins deletes the network node. It never re-uses the same node index.
Thus, in your example, the first vehicle that starts driving will be coche[0]. The next vehicle that starts driving will be coche[1] - independent of whether coche[0] already arrived or is still driving.

Add bottom side-to-side scroll bar to ExtJS Grid

Here are my two grids -- they are ExtJs grids however we wrap the declarations in vb.net code:
Dim VehicleOptionsGrid As New Framework.WebControls.Grids.Grid
With VehicleOptionsGrid
.ID = "VehicleOptionsGrid"
.Title = "Vehicle Options"
.Toolbar.UseDefaultButtons = False
.Mode = Grids.Grid.GridMode.Control
.Panel.Border = False
.Panel.Style = "border-width:1px;margin-bottom:5px"
.Ref = "../../../../VehicleOptionsGrid"
.Editable = True
With .Columns.Add("IsSelected", "Selection", Framework.WebControls.Grids.Grid.ColumnDataType.Boolean)
.Renderer = "renderVehicleCheckbox"
End With
.Columns.Add("CollateralId", "").Hidden = True
.Columns.Add("OptionId", "OptionId").Hidden =True
.Columns.Add("OptionName", "Name").Width = 400
.GridHeight = 400
.DataBind()
ViewResponse.AddScript(.ToString(False))
ViewResponse.AddScript("VehicleOptionsGrid.grid.addListener('cellclick', changeOptionStatus);")
End With
Dim VehicleResultsGrid As New Framework.WebControls.Grids.Grid
With VehicleResultsGrid
.ID = "VehicleResultsGrid"
.Title = "Results"
.Toolbar.UseDefaultButtons = False
.Mode = Grids.Grid.GridMode.Control
.Panel.Border = False
.Panel.Style = "border-width:1px;margin-bottom:5px"
.Ref = "../../../../VehicleResultsGrid"
.Columns.Add("CollateralId", "").Hidden = True
.Columns.Add("ValueType", "Value Type")
.Columns.Add("ValueAmount", "Amount", Framework.WebControls.Grids.Grid.ColumnDataType.Money).Width = 400
.GridHeight = 400
.DataBind()
ViewResponse.AddScript(.ToString(False))
End With
Using javascript, is there anyway I can add a bottom scroll bar to these grids? Doesn't seem like we have a wrapped command to do it...
Answer, if you have a button on the bottom toolbar, only solution is to resize the columns to be able to see them all together, or enable column drag and drop.

Resources